﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0054)http://www.cppblog.com/yishanhante/articles/65041.html -->
<HTML><HEAD id=Head><TITLE>usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META id=metaKeywords content=usb鼠标驱动注解及测试【转】 name=keywords><LINK id=MainCss 
href="usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files/style.css" type=text/css 
rel=stylesheet><LINK id=RSSLink title=RSS 
href="http://www.cppblog.com/yishanhante/rss.aspx" type=application/rss+xml 
rel=alternate>
<META content="MSHTML 6.00.2900.5921" name=GENERATOR></HEAD>
<BODY>
<FORM id=Form1 name=Form1 onsubmit="javascript:return WebForm_OnSubmit();" 
action=65041.html method=post>
<DIV><INPUT id=__EVENTTARGET type=hidden name=__EVENTTARGET> <INPUT 
id=__EVENTARGUMENT type=hidden name=__EVENTARGUMENT> <INPUT 
id="&#13;&#10;__VIEWSTATE" type=hidden name=__VIEWSTATE> </DIV>
<SCRIPT type=text/javascript>
//<![CDATA[
var theForm = document.forms['Form1'];
if (!theForm) {
    theForm = document.Form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</SCRIPT>

<SCRIPT src="usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files/WebResource.axd" 
type=text/javascript></SCRIPT>

<SCRIPT language=JavaScript>
									function ctlent(evt,id)
											{
												if(evt.ctrlKey && evt.keyCode == 13)
												{	
													try
													{
														TempSave(id);
													}
													catch(ex)
													{
													}
													finally
													{
													    __doPostBack('AjaxHolder$PostComment$btnSubmit','')
													}
												}
		
												}</SCRIPT>

<SCRIPT language=JavaScript>function SetReplyAuhor(author){document.getElementById('AjaxHolder_PostComment_tbComment').value+="@"+author+"\n";document.getElementById('AjaxHolder_PostComment_tbComment').focus();return false}</SCRIPT>

<SCRIPT src="usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files/ScriptResource.axd" 
type=text/javascript></SCRIPT>

<SCRIPT 
src="C:\Documents and Settings\Administrator\桌面\usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files\ScriptResource(1).axd" 
type=text/javascript></SCRIPT>

<SCRIPT 
src="C:\Documents and Settings\Administrator\桌面\usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files\ScriptResource(2).axd" 
type=text/javascript></SCRIPT>

<SCRIPT type=text/javascript>
//<![CDATA[
function WebForm_OnSubmit() {
if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) return false;
return true;
}
//]]>
</SCRIPT>
<!--done-->
<DIV id=header><!--done-->
<DIV class=header>
<DIV class=headerText><A class=headermaintitle id=Header1_HeaderTitle 
href="http://www.cppblog.com/yishanhante/">Thinking in 
C++</A><BR></DIV></DIV></DIV>
<DIV id=mytopmenu>
<DIV id=mylinks><!--done--><A class=menu id=MyLinks1_HomeLink 
href="http://www.cppblog.com/">C++博客</A>&nbsp;&nbsp; <A class=menu 
id=MyLinks1_MyHomeLink 
href="http://www.cppblog.com/yishanhante/">首页</A>&nbsp;&nbsp; <A class=menu 
id=MyLinks1_NewPostLink 
href="http://www.cppblog.com/yishanhante/admin/EditPosts.aspx?opt=1">新随笔</A> <A 
class=menu id=MyLinks1_ContactLink 
href="http://www.cppblog.com/yishanhante/contact.aspx?id=1">联系</A>&nbsp;&nbsp; 
<A class=menu id=MyLinks1_Syndication 
href="http://www.cppblog.com/yishanhante/Rss.aspx">聚合</A><A id=MyLinks1_XMLLink 
href="http://www.cppblog.com/yishanhante/Rss.aspx"><IMG 
style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
src="usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files/xml.gif"></A>&nbsp;&nbsp; 
<A class=menu id=MyLinks1_Admin 
href="http://www.cppblog.com/yishanhante/admin/EditPosts.aspx">管理</A> </DIV>
<DIV id=mystats><!--done-->随笔-12&nbsp; 评论-23&nbsp; 文章-54&nbsp; trackbacks-0 
</DIV></DIV>
<DIV id=centercontent><!--done-->
<DIV class=post>
<DIV class=postTitle><A class=postTitle2 id=viewpost1_TitleUrl 
href="http://www.cppblog.com/yishanhante/articles/65041.html">usb鼠标驱动注解及测试【转】</A> 
</DIV><SPAN style="FONT-SIZE: 12px; LINE-HEIGHT: 18px; FONT-FAMILY: verdana">
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
style="FONT-FAMILY: 宋体">参考<ST1:CHSDATE isrocdate="False" islunardate="False" 
day="30" month="12" year="1899" w:st="on"><SPAN 
lang=EN-US>2.6.14</SPAN></ST1:CHSDATE>版本中的<SPAN 
lang=EN-US>driver/usb/input/usbmouse.c</SPAN>。鼠标驱动可分为几个部分：驱动加载部分、<SPAN 
lang=EN-US>probe</SPAN>部分、<SPAN lang=EN-US>open</SPAN>部分、<SPAN 
lang=EN-US>urb</SPAN>回调函数处理部分。</SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
style="FONT-FAMILY: 宋体"><SPAN lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
style="FONT-FAMILY: 宋体">下文阴影部分为注解。</SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
style="FONT-FAMILY: 宋体"><SPAN lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 黑体"><SPAN>一、<SPAN 
style="FONT: 7pt '', 'Times New Roman', ''"><FONT 
size=3>&nbsp;&nbsp;&nbsp;</FONT></SPAN></SPAN></SPAN><SPAN 
style="FONT-SIZE: 12pt; FONT-FAMILY: 黑体">驱动加载部分</SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
style="FONT-SIZE: 12pt; FONT-FAMILY: 黑体"><SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">static int __init 
usb_mouse_init(void)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">{<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>int 
retval = usb_register(&amp;<STRONG>usb_mouse_drive</STRONG>r);//</SPAN><SPAN 
style="FONT-FAMILY: 宋体">注册鼠标驱动<SPAN lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
(retval == 0)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>info(DRIVER_VERSION 
":" DRIVER_DESC);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>return 
retval;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">}</SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
style="FONT-FAMILY: 宋体">其中<SPAN lang=EN-US>usb_mouse_driver</SPAN>的定义为：<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">static struct usb_driver usb_mouse_driver = 
{<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;</SPAN>.owner<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>= 
THIS_MODULE,<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;</SPAN>.name<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>= 
"usbmouse",<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;</SPAN>.probe<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>= 
usb_mouse_probe,<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;</SPAN>.disconnect<SPAN>&nbsp;</SPAN>= 
usb_mouse_disconnect,<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;</SPAN>.id_table<SPAN>&nbsp;&nbsp;&nbsp;</SPAN>= 
usb_mouse_id_table,<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">};<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
style="FONT-FAMILY: 宋体">如果注册成功的话，将会调用<SPAN 
lang=EN-US>usb_mouse_probe</SPAN>。那么什么时候才算注册成功呢？<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
style="FONT-FAMILY: 宋体">和其它驱动注册过程一样，只有在其对应的“总线”上发现匹配的“设备”才会调用<SPAN 
lang=EN-US>probe</SPAN>。总线匹配的方法和具体总线相关，如：<SPAN 
lang=EN-US>platform_bus_type</SPAN>中是判断驱动名称和平台设备名称是否相同；那如何确认<SPAN 
lang=EN-US>usb</SPAN>总线的匹配方法呢？<SPAN lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">Usb</SPAN><SPAN 
style="FONT-FAMILY: 宋体">设备是注册在<SPAN lang=EN-US>usb_bus_type</SPAN>总线下的。查看<SPAN 
lang=EN-US>usb_bus_type</SPAN>的匹配方法。<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">struct bus_type usb_bus_type = 
{<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>.name 
=<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>"usb",<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>.match 
=<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><STRONG>usb_device_match</STRONG>,<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>.hotplug 
=<SPAN>&nbsp;&nbsp;</SPAN>usb_hotplug,<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>.suspend 
=<SPAN>&nbsp;&nbsp;</SPAN>usb_generic_suspend,<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>.resume 
=<SPAN>&nbsp;&nbsp;&nbsp;</SPAN>usb_generic_resume,<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">};<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
style="FONT-FAMILY: 宋体">其中<SPAN lang=EN-US>usb_device_match</SPAN>定义了匹配方法<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">static int usb_device_match (struct device 
*dev, struct device_driver *drv)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">{<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>struct 
usb_interface *intf;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>struct 
usb_driver *usb_drv;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>const 
struct usb_device_id *id;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>/* check 
for generic driver, which we don''t match any device with 
*/<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if (drv 
== &amp;usb_generic_driver)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>return 
0;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>intf = 
to_usb_interface(dev);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>usb_drv 
= to_usb_driver(drv);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><STRONG><EM>id = 
usb_match_id (intf, usb_drv-&gt;id_table);<O:P></O:P></EM></STRONG></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
(id)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>return 
1;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>return 
0;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">}<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
style="FONT-FAMILY: 宋体">可以看出<SPAN lang=EN-US>usb</SPAN>的匹配方法是<STRONG><EM><SPAN 
lang=EN-US>usb_match_id (intf, 
usb_drv-&gt;id_table)</SPAN>，</EM></STRONG>也就是说通过比对“<SPAN 
lang=EN-US>dev</SPAN>中<SPAN lang=EN-US>intf</SPAN>信息”和“<SPAN 
lang=EN-US>usb_drv-&gt;id_table</SPAN>信息”，如果匹配则说明驱动所对应的设备已经添加到总线上了，所以接下了就会调用<SPAN 
lang=EN-US>drv</SPAN>中的<SPAN lang=EN-US>probe</SPAN>方法注册<SPAN 
lang=EN-US>usb</SPAN>设备驱动。<SPAN lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">usb_mouse_id_table</SPAN><SPAN 
style="FONT-FAMILY: 宋体">的定义为：<SPAN lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">static struct 
usb_device_id&nbsp;<STRONG>usb_mouse_id_table</STRONG>[] = 
{<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>{&nbsp;<STRONG><EM>USB_INTERFACE_INFO</EM></STRONG>(3, 
1, 2) },<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>{ 
}<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>/* 
Terminating entry */<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">};<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体">#define<STRONG>&nbsp;USB_INTERFACE_INFO</STRONG>(cl,sc,pr) 
\<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">.match_flags 
=&nbsp;<STRONG>USB_DEVICE_ID_MATCH_INT_INFO</STRONG>, \<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=PT-BR style="FONT-FAMILY: 宋体">.bInterfaceClass = (cl), 
\<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=PT-BR style="FONT-FAMILY: 宋体">.bInterfaceSubClass = (sc), 
\<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=PT-BR style="FONT-FAMILY: 宋体">.bInterfaceProtocol = 
(pr)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
style="FONT-FAMILY: 宋体">鼠标设备遵循<SPAN lang=PT-BR>USB</SPAN>人机接口设备（<SPAN 
lang=PT-BR>HID</SPAN>），在<SPAN lang=PT-BR>HID</SPAN>规范中规定鼠标接口类码为：</SPAN><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
style="FONT-FAMILY: 宋体">接口类：<SPAN lang=EN-US>0x03<O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
style="FONT-FAMILY: 宋体">接口子类：<SPAN lang=EN-US>0x01<O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
style="FONT-FAMILY: 宋体">接口协议：<SPAN lang=EN-US>0x02<O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
style="FONT-FAMILY: 宋体">这样分类的好处是设备厂商可以直接利用标准的驱动程序。除了<SPAN 
lang=EN-US>HID</SPAN>类以外还有<SPAN lang=EN-US>Mass storage</SPAN>、<SPAN 
lang=EN-US>printer</SPAN>、<SPAN lang=EN-US>audio</SPAN>等<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体">#define&nbsp;<STRONG>USB_DEVICE_ID_MATCH_INT_INFO</STRONG>&nbsp;\<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">(USB_DEVICE_ID_MATCH_INT_CLASS | 
USB_DEVICE_ID_MATCH_INT_SUBCLASS | 
USB_DEVICE_ID_MATCH_INT_PROTOCOL)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></SPAN><SPAN 
style="FONT-FAMILY: 宋体">匹配的过程为：<SPAN lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">usb_match_id(struct usb_interface *interface, 
const struct usb_device_id *id)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">{<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>struct 
usb_host_interface *intf;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>struct 
usb_device *dev;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>/* 
proc_connectinfo in devio.c may call us with id == NULL. 
*/<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if (id 
== NULL)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>return 
NULL;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>intf = 
interface-&gt;cur_altsetting;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>dev = 
interface_to_usbdev(interface);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>/* It is 
important to check that id-&gt;driver_info is nonzero,<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;</SPAN>since 
an entry that is all zeroes except for a nonzero<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;</SPAN>id-&gt;driver_info 
is the way to create an entry that<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;</SPAN>indicates 
that the driver want to examine every<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;</SPAN>device 
and interface. */<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>for (; 
id-&gt;idVendor || id-&gt;bDeviceClass || id-&gt;bInterfaceClass 
||<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>id-&gt;driver_info; 
id++) {<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
((id-&gt;match_flags &amp; USB_DEVICE_ID_MATCH_VENDOR) 
&amp;&amp;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>id-&gt;idVendor 
!= le16_to_cpu(dev-&gt;descriptor.idVendor))<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>continue;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
((id-&gt;match_flags &amp; USB_DEVICE_ID_MATCH_PRODUCT) 
&amp;&amp;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>id-&gt;idProduct 
!= le16_to_cpu(dev-&gt;descriptor.idProduct))<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>continue;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>/* 
No need to test id-&gt;bcdDevice_lo != 0, since 0 is never<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;</SPAN>greater 
than any unsigned number. */<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
((id-&gt;match_flags &amp; USB_DEVICE_ID_MATCH_DEV_LO) 
&amp;&amp;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>(id-&gt;bcdDevice_lo 
&gt; le16_to_cpu(dev-&gt;descriptor.bcdDevice)))<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>continue;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
((id-&gt;match_flags &amp; USB_DEVICE_ID_MATCH_DEV_HI) 
&amp;&amp;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></SPAN><SPAN 
lang=FR style="FONT-FAMILY: 宋体">(id-&gt;bcdDevice_hi &lt; 
le16_to_cpu(dev-&gt;descriptor.bcdDevice)))<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=FR 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>continue;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=FR style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=FR 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></SPAN><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">if ((id-&gt;match_flags &amp; 
USB_DEVICE_ID_MATCH_DEV_CLASS) &amp;&amp;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>(id-&gt;bDeviceClass 
!= dev-&gt;descriptor.bDeviceClass))<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>continue;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
((id-&gt;match_flags &amp; USB_DEVICE_ID_MATCH_DEV_SUBCLASS) 
&amp;&amp;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>(id-&gt;bDeviceSubClass!= 
dev-&gt;descriptor.bDeviceSubClass))<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>continue;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
((id-&gt;match_flags &amp; USB_DEVICE_ID_MATCH_DEV_PROTOCOL) 
&amp;&amp;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></SPAN><SPAN 
lang=PT-BR style="FONT-FAMILY: 宋体">(id-&gt;bDeviceProtocol != 
dev-&gt;descriptor.bDeviceProtocol))<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=PT-BR 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></SPAN><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">continue;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>//</SPAN><SPAN 
style="FONT-FAMILY: 宋体">接口类<SPAN lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
((id-&gt;match_flags &amp;&nbsp;<STRONG>USB_DEVICE_ID_MATCH_INT_CLASS</STRONG>) 
&amp;&amp;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>(id-&gt;bInterfaceClass 
!= intf-&gt;desc.bInterfaceClass))<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>continue;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>//</SPAN><SPAN 
style="FONT-FAMILY: 宋体">接口子类<SPAN lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
((id-&gt;match_flags 
&amp;&nbsp;<STRONG>USB_DEVICE_ID_MATCH_INT_SUBCLASS</STRONG>) 
&amp;&amp;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>(id-&gt;bInterfaceSubClass 
!= intf-&gt;desc.bInterfaceSubClass))<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>continue;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>//</SPAN><SPAN 
style="FONT-FAMILY: 宋体">遵循的协议<SPAN lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
((id-&gt;match_flags 
&amp;&nbsp;<STRONG>USB_DEVICE_ID_MATCH_INT_PROTOCOL</STRONG>) 
&amp;&amp;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></SPAN><SPAN 
lang=PT-BR style="FONT-FAMILY: 宋体">(id-&gt;bInterfaceProtocol != 
intf-&gt;desc.bInterfaceProtocol))<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=PT-BR 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></SPAN><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">continue;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>return 
id;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>}<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>return 
NULL;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">}<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
style="FONT-FAMILY: 宋体">从中可以看出，只有当设备的接口类、接口子类、接口协议匹配鼠标驱动时鼠标驱动才会调用<SPAN 
lang=EN-US>probe</SPAN>方法。<SPAN lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><STRONG><SPAN 
style="FONT-SIZE: 12pt; FONT-FAMILY: 黑体">二、<SPAN lang=EN-US>probe</SPAN>部分<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></STRONG></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">static int usb_mouse_probe(struct 
usb_interface * intf, const struct usb_device_id * id)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">{<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>struct 
usb_device * dev = interface_to_usbdev(intf);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>struct 
usb_host_interface *interface;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>struct 
usb_endpoint_descriptor *endpoint;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>struct 
usb_mouse *mouse;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>int 
pipe, maxp;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>char 
path[64];<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>interface = 
intf-&gt;cur_altsetting;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; TEXT-ALIGN: left; webkit-background-clip: initial; webkit-background-origin: initial" 
align=left><SPAN lang=EN-US style="FONT-FAMILY: 宋体">/*</SPAN><FONT size=3><SPAN 
lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">以下是网络的一段对</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">cur_altsettin</SPAN><SPAN 
style="FONT-FAMILY: 宋体">的解释，下面就借花献佛。</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">usb&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">设备有一个</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">configuration&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">的概念</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">表示配置，一个设备可以有多个配置，但只能同时激活一个，如：一些设备可以下载固件，或可以设置不同的全局模式，就像手机可以被设定为静音模式或响铃模式一样。</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">而这里又有一个</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">setting,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">咋一看有些奇怪</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">这两个词不是一回事吗</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">.</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">还是拿我们最熟悉的手机来打比方</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">,configuration&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">不说了</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">,setting,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">一个手机可能各种配置都确定了</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">是振动还是铃声已经确定了</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">各种功能都确定了</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">但是声音的大小还可以变吧</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">通常手机的音量是一格一格的变动</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">大概也就</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">5,6&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">格</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">那么这个可以算一个</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">setting&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">吧</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">.</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">这里</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">cur_altsetting&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">就是表示的当前的这个</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">setting,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">或者说设置</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">。可以查看原码中</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">usb_interface&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">结构定义的说明部分。从说明中可以看到一个接口可以有多种</SPAN><SPAN 
lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">setting*/</SPAN><SPAN 
lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体"><O:P></O:P></SPAN></FONT></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
(interface-&gt;desc.bNumEndpoints != 
1)<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">return -ENODEV;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">/*</SPAN><SPAN 
style="FONT-FAMILY: 宋体">根据<SPAN 
lang=EN-US>HID</SPAN>规则，期望鼠标只有一个端点即中断端点</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: Verdana">bNumEndpoints&nbsp;</SPAN><SPAN 
style="FONT-FAMILY: 宋体">就是接口描述符中的成员</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: Verdana">,</SPAN><SPAN 
style="FONT-FAMILY: 宋体">表示这个接口有多少个端点</SPAN><SPAN 
style="FONT-FAMILY: 宋体">，</SPAN><SPAN 
style="FONT-FAMILY: 宋体">不过这其中不包括</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: Verdana">0&nbsp;</SPAN><SPAN 
style="FONT-FAMILY: 宋体">号端点</SPAN><SPAN style="FONT-FAMILY: 宋体">，</SPAN><SPAN 
lang=EN-US style="FONT-FAMILY: Verdana">0</SPAN><SPAN 
style="FONT-FAMILY: 宋体">号端点是任何一个</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: Verdana">usb&nbsp;</SPAN><SPAN 
style="FONT-FAMILY: 宋体">设备都必须是提供的</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: Verdana">,</SPAN><SPAN 
style="FONT-FAMILY: 宋体">这个端点专门用于进行控制传输</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: Verdana">,</SPAN><SPAN 
style="FONT-FAMILY: 宋体">即它是一个控制端点</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: Verdana">.</SPAN><SPAN 
style="FONT-FAMILY: 宋体">正因为如此</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: Verdana">,</SPAN><SPAN 
style="FONT-FAMILY: 宋体">所以即使一个设备没有进行任何设置</SPAN><SPAN 
style="FONT-FAMILY: 宋体">，</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: Verdana">usb&nbsp;</SPAN><SPAN 
style="FONT-FAMILY: 宋体">主机也可以开始跟它进行一些通信</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: Verdana">,</SPAN><SPAN 
style="FONT-FAMILY: 宋体">因为即使不知道其它的端点</SPAN><SPAN 
style="FONT-FAMILY: 宋体">，</SPAN><SPAN 
style="FONT-FAMILY: 宋体">但至少知道它一定有一个</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: Verdana">0</SPAN><SPAN 
style="FONT-FAMILY: 宋体">号端点</SPAN><SPAN style="FONT-FAMILY: 宋体">，</SPAN><SPAN 
style="FONT-FAMILY: 宋体">或者说一个控制端点。<SPAN lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><EM><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">*/<O:P></O:P></SPAN></EM></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>endpoint 
= &amp;interface-&gt;endpoint[0].desc;//</SPAN><SPAN 
style="FONT-FAMILY: 宋体">端点<SPAN lang=EN-US>0</SPAN>描述符，此处的<SPAN 
lang=EN-US>0</SPAN>表示中断端点<SPAN lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
(!(endpoint-&gt;bEndpointAddress &amp; 0x80))<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>return 
-ENODEV;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; TEXT-ALIGN: left; webkit-background-clip: initial; webkit-background-origin: initial" 
align=left><SPAN lang=EN-US style="FONT-FAMILY: 宋体">/*</SPAN><SPAN 
style="FONT-FAMILY: 宋体">先看</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">bEndpointAddress,</SPAN><SPAN 
style="FONT-FAMILY: 宋体">这个</SPAN><SPAN lang=EN-US style="FONT-FAMILY: 宋体">struct 
usb_endpoint_descriptor&nbsp;</SPAN><SPAN 
style="FONT-FAMILY: 宋体">中的一个成员</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">,</SPAN><SPAN style="FONT-FAMILY: 宋体">是</SPAN><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">8</SPAN><SPAN 
style="FONT-FAMILY: 宋体">个</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">bit</SPAN><SPAN style="FONT-FAMILY: 宋体">，</SPAN><SPAN 
style="FONT-FAMILY: 宋体">或者说</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">1&nbsp;</SPAN><SPAN 
style="FONT-FAMILY: 宋体">个</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">byte</SPAN><SPAN style="FONT-FAMILY: 宋体">，</SPAN><SPAN 
style="FONT-FAMILY: 宋体">其中</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">bit7&nbsp;</SPAN><SPAN 
style="FONT-FAMILY: 宋体">表示的是这个端点的方向</SPAN><SPAN style="FONT-FAMILY: 宋体">，<SPAN 
lang=EN-US>0&nbsp;</SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体">表示</SPAN><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">OUT</SPAN><SPAN 
style="FONT-FAMILY: 宋体">，<SPAN lang=EN-US>1&nbsp;</SPAN></SPAN><SPAN 
style="FONT-FAMILY: 宋体">表示</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">IN</SPAN><SPAN style="FONT-FAMILY: 宋体">，<SPAN 
lang=EN-US>OUT&nbsp;</SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体">与</SPAN><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">IN&nbsp;</SPAN><SPAN 
style="FONT-FAMILY: 宋体">是对主机而言</SPAN><SPAN style="FONT-FAMILY: 宋体">。<SPAN 
lang=EN-US>OUT&nbsp;</SPAN></SPAN><SPAN 
style="FONT-FAMILY: 宋体">就是从主机到设备</SPAN><SPAN style="FONT-FAMILY: 宋体">，<SPAN 
lang=EN-US>IN&nbsp;</SPAN></SPAN><SPAN 
style="FONT-FAMILY: 宋体">就是从设备到主机</SPAN><SPAN 
style="FONT-FAMILY: 宋体">。</SPAN><SPAN style="FONT-FAMILY: 宋体">而宏<SPAN 
lang=EN-US>*</SPAN></SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">USB_DIR_IN&nbsp;</SPAN><SPAN 
style="FONT-FAMILY: 宋体">来自<SPAN lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; TEXT-ALIGN: left; webkit-background-clip: initial; webkit-background-origin: initial" 
align=left><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">*include/linux/usb_ch9.h<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; TEXT-ALIGN: left; webkit-background-clip: initial; webkit-background-origin: initial" 
align=left><SPAN lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;</SPAN>* USB 
directions<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; TEXT-ALIGN: left; webkit-background-clip: initial; webkit-background-origin: initial" 
align=left><SPAN lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;</SPAN>* This 
bit flag is used in endpoint descriptors'' bEndpointAddress 
field.<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; TEXT-ALIGN: left; webkit-background-clip: initial; webkit-background-origin: initial" 
align=left><SPAN lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;</SPAN>* It''s 
also one of three fields in control requests bRequestType.<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; TEXT-ALIGN: left; webkit-background-clip: initial; webkit-background-origin: initial" 
align=left><SPAN lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;</SPAN>*#define 
USB_DIR_OUT 0 /* to device */<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; TEXT-ALIGN: left; webkit-background-clip: initial; webkit-background-origin: initial" 
align=left><SPAN lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;</SPAN>*#define 
USB_DIR_IN 0x80 /* to host */</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">*/<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
((endpoint-&gt;bmAttributes &amp; 3) != 
3)<SPAN>&nbsp;&nbsp;</SPAN>//</SPAN><SPAN style="FONT-FAMILY: 宋体">判断是否是中断类型<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">return -ENODEV;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; TEXT-ALIGN: left; webkit-background-clip: initial; webkit-background-origin: initial" 
align=left><SPAN lang=EN-US style="FONT-FAMILY: 宋体">/*</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">&nbsp;bmAttributes&nbsp;</SPAN><SPAN 
style="FONT-FAMILY: 宋体">表示属性</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">,</SPAN><SPAN style="FONT-FAMILY: 宋体">总共</SPAN><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">8</SPAN><SPAN 
style="FONT-FAMILY: 宋体">位</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">,</SPAN><SPAN style="FONT-FAMILY: 宋体">其中</SPAN><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">bit1</SPAN><SPAN 
style="FONT-FAMILY: 宋体">和</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">bit0&nbsp;</SPAN><SPAN 
style="FONT-FAMILY: 宋体">共同称为</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">Transfer Type,</SPAN><SPAN 
style="FONT-FAMILY: 宋体">即传输类型</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">,</SPAN><SPAN style="FONT-FAMILY: 宋体">即</SPAN><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">00&nbsp;</SPAN><SPAN 
style="FONT-FAMILY: 宋体">表示控制</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">,01&nbsp;</SPAN><SPAN 
style="FONT-FAMILY: 宋体">表示等时</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">,10&nbsp;</SPAN><SPAN 
style="FONT-FAMILY: 宋体">表示批量</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">,11&nbsp;</SPAN><SPAN 
style="FONT-FAMILY: 宋体">表示中断</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">*/</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>pipe = 
usb_rcvintpipe(dev, endpoint-&gt;bEndpointAddress);//</SPAN><SPAN 
style="FONT-FAMILY: 宋体">构造中断端点的输入<SPAN 
lang=EN-US>pipe<O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>maxp = 
usb_maxpacket(dev, pipe, usb_pipeout(pipe));<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">/*</SPAN><SPAN 
style="FONT-FAMILY: 宋体">跟踪<SPAN 
lang=EN-US>usb_maxpacket<O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">usb_maxpacket(struct usb_device *udev, int 
pipe, int is_out)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">{<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>struct 
usb_host_endpoint<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>*ep;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>unsigned<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>epnum 
= usb_pipeendpoint(pipe);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">/*<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; TEXT-ALIGN: left; webkit-background-clip: initial; webkit-background-origin: initial" 
align=left><FONT size=3><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">得到的自然就是原来</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">pipe&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">里边的</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">15&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">至</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">18&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">位</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">.</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">一个</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">pipe&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">的</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">15&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">位至</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">18&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">位是</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">endpoint&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">号</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">,(</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">一共</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">16&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">个</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">endpoint,)</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">所以很显然</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">这里就是得到</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">endpoint&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">号<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></FONT></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">*/<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
(is_out) {<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>WARN_ON(usb_pipein(pipe));<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>ep 
= udev-&gt;ep_out[epnum];<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>} else 
{<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>WARN_ON(usb_pipeout(pipe));<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>ep 
= udev-&gt;ep_in[epnum];<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>}<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
(!ep)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>return 
0;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>/* 
NOTE:<SPAN>&nbsp;&nbsp;</SPAN>only 0x07ff bits are for packet size... 
*/<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>return 
le16_to_cpu(ep-&gt;desc.wMaxPacketSize);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">}<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">*/<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">//</SPAN><SPAN 
style="FONT-FAMILY: 宋体">返回对应端点能够传输的最大的数据包，鼠标的返回的最大数据包为<SPAN 
lang=EN-US>4</SPAN>个字节，<SPAN lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
style="FONT-FAMILY: 宋体">第<SPAN lang=EN-US>0</SPAN>个字节：<SPAN lang=EN-US>bit 
0</SPAN>、<SPAN lang=EN-US>1</SPAN>、<SPAN lang=EN-US>2</SPAN>、<SPAN 
lang=EN-US>3</SPAN>、<SPAN lang=EN-US>4</SPAN>分别代表左、右、中、<SPAN 
lang=EN-US>SIDE</SPAN>、<SPAN lang=EN-US>EXTRA</SPAN>键的按下情况<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
style="FONT-FAMILY: 宋体">第<SPAN lang=EN-US>1</SPAN>个字节：表示鼠标的水平位移<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
style="FONT-FAMILY: 宋体">第<SPAN lang=EN-US>2</SPAN>个字节：表示鼠标的垂直位移<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
style="FONT-FAMILY: 宋体">第<SPAN lang=EN-US>3</SPAN>个字节：<SPAN 
lang=EN-US>REL_WHEEL</SPAN>位移<SPAN lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
(!(mouse = kmalloc(sizeof(struct usb_mouse), GFP_KERNEL)))<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>return 
-ENOMEM;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>memset(mouse, 0, 
sizeof(struct usb_mouse));<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>mouse-&gt;data = 
usb_buffer_alloc(dev, 8, SLAB_ATOMIC, 
&amp;mouse-&gt;data_dma);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">/*<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
style="FONT-FAMILY: 宋体">申请用于<SPAN lang=EN-US>urb</SPAN>用于数据传输的内存，注意：这里将返回“<SPAN 
lang=EN-US>mouse-&gt;data</SPAN>”和“<SPAN 
lang=EN-US>mouse-&gt;data_dma</SPAN>”<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">mouse-&gt;data</SPAN><SPAN 
style="FONT-FAMILY: 宋体">：记录了用于普通传输用的内存指针<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">mouse-&gt;data_dma</SPAN><SPAN 
style="FONT-FAMILY: 宋体">：记录了用于<SPAN lang=EN-US>DMA</SPAN>传输的内存指针<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
style="FONT-FAMILY: 宋体">如果是<SPAN lang=EN-US>DMA&nbsp;</SPAN>方式的传输，那么<SPAN 
lang=EN-US>usb core&nbsp;</SPAN>就应该使用<SPAN 
lang=EN-US>mouse-&gt;data_dma<O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">*/<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
(!mouse-&gt;data) {<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>kfree(mouse);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>return 
-ENOMEM;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>}<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>mouse-&gt;irq = 
usb_alloc_urb(0, GFP_KERNEL);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
(!mouse-&gt;irq) {<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>usb_buffer_free(dev, 
8, mouse-&gt;data, mouse-&gt;data_dma);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>kfree(mouse);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>return 
-ENODEV;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>}<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>mouse-&gt;usbdev = 
dev;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>mouse-&gt;dev.evbit[0] 
= BIT(EV_KEY) | BIT(EV_REL);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">//</SPAN><SPAN 
style="FONT-FAMILY: 宋体">设置<SPAN lang=EN-US>input</SPAN>系统响应按键和<SPAN 
lang=EN-US>REL</SPAN>（相对结果）事件<SPAN lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>mouse-&gt;dev.keybit[LONG(BTN_MOUSE)] 
= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></SPAN><SPAN 
lang=FR style="FONT-FAMILY: 宋体">mouse-&gt;dev.relbit[0] = BIT(REL_X) | 
BIT(REL_Y);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=FR 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></SPAN><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">mouse-&gt;dev.keybit[LONG(BTN_MOUSE)] |= 
BIT(BTN_SIDE) | BIT(BTN_EXTRA);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>mouse-&gt;dev.relbit[0] 
|= BIT(REL_WHEEL);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">//</SPAN><SPAN 
style="FONT-FAMILY: 宋体">设置<SPAN lang=EN-US>input</SPAN>系统响应的码表及<SPAN 
lang=EN-US>rel</SPAN>表<SPAN lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>mouse-&gt;dev.private 
= mouse;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>mouse-&gt;dev.open 
= usb_mouse_open;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>mouse-&gt;dev.close 
= usb_mouse_close;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>usb_make_path(dev, 
path, 64);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>sprintf(mouse-&gt;phys, 
"%s/input0", path);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>mouse-&gt;dev.name 
= mouse-&gt;name;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>mouse-&gt;dev.phys 
= mouse-&gt;phys;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>usb_to_input_id(dev, 
&amp;mouse-&gt;dev.id);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">/*<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">usb_to_input_id(const struct usb_device *dev, 
struct input_id *id)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">{<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>id-&gt;bustype = 
BUS_USB;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>id-&gt;vendor = 
le16_to_cpu(dev-&gt;descriptor.idVendor);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>id-&gt;product = 
le16_to_cpu(dev-&gt;descriptor.idProduct);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>id-&gt;version = 
le16_to_cpu(dev-&gt;descriptor.bcdDevice);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">}<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; TEXT-ALIGN: left; webkit-background-clip: initial; webkit-background-origin: initial" 
align=left><FONT size=3><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">struct usb_device&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">中有一个</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">成员</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">struct 
usb_device_descriptor,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">而</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">struct 
usb_device_descriptor&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">中的成员</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">__u16 bcdDevice,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">表示的是制造商指定的产品的版本号<SPAN 
lang=EN-US>,</SPAN>制造商</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">id&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">和产品</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">id&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">来标志一个设备</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">.bcdDevice&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">一共</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">16&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">位</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">是以</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">bcd</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">码的方式保存的信息</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">也就是说</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">每</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">4&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">位代表一个十进制的数</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">比如</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">0011 0110 1001 
0111&nbsp;</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">就代表的</SPAN><SPAN 
lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">3697.<O:P></O:P></SPAN></FONT></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; TEXT-ALIGN: left; webkit-background-clip: initial; webkit-background-origin: initial" 
align=left><FONT size=3><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">业内为每家公司编一个号</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">这样便于管理</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">比如三星的编号就是</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">0x0839,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">那么三星的产品中就会在其设备描述符中</SPAN><STRONG><SPAN 
lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">idVendor</SPAN></STRONG><SPAN 
lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">的烙上</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">0x0839.</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">而三星自己的每种产品也会有个编号</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">和</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">Digimax 410&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">对应的编号就是</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">0x<ST1:CHMETCNV w:st="on" tcsc="0" 
numbertype="1" negative="False" hasspace="False" sourcevalue="0" 
unitname="a">000a</ST1:CHMETCNV>,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">而</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">bcdDevice_lo&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">和</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">bcdDevice_hi&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">共同组成一个具体设备的编号</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">(device 
release<O:P></O:P></SPAN></FONT></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; TEXT-ALIGN: left; webkit-background-clip: initial; webkit-background-origin: initial" 
align=left><FONT size=3><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">number),bcd&nbsp;</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">就意味着这个编号是二进制的格式</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">.<O:P></O:P></SPAN></FONT></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">*/<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>mouse-&gt;dev.dev = 
&amp;intf-&gt;dev;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
(dev-&gt;manufacturer)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>strcat(mouse-&gt;name, 
dev-&gt;manufacturer);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
(dev-&gt;product)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>sprintf(mouse-&gt;name, 
"%s %s", mouse-&gt;name, dev-&gt;product);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
(!strlen(mouse-&gt;name))<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>sprintf(mouse-&gt;name, 
"USB HIDBP Mouse %04x:%04x",<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>mouse-&gt;dev.id.vendor, 
mouse-&gt;dev.id.product);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>usb_fill_int_urb(mouse-&gt;irq, 
dev, pipe, mouse-&gt;data,<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;</SPAN>(maxp 
&gt; 8 ? 8 : maxp),<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;</SPAN>usb_mouse_irq, 
mouse, endpoint-&gt;bInterval);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">/*<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">static inline void usb_fill_int_urb (struct 
urb *urb,<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>struct 
usb_device *dev,<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>unsigned 
int pipe,<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>void 
*transfer_buffer,<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>int 
buffer_length,<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>usb_complete_t 
complete,<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>void 
*context,<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>int 
interval)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">{<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>spin_lock_init(&amp;urb-&gt;lock);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>urb-&gt;dev = 
dev;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>urb-&gt;pipe = 
pipe;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>urb-&gt;transfer_buffer 
= transfer_buffer;//</SPAN><SPAN style="FONT-FAMILY: 宋体">如果不使用<SPAN 
lang=EN-US>DMA</SPAN>传输方式，则使用这个缓冲指针。如何用<SPAN lang=EN-US>DMA</SPAN>则使用<SPAN 
lang=EN-US>transfer_DMA</SPAN>，这个值会在后面单独给<SPAN lang=EN-US>URB</SPAN>赋<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>urb-&gt;transfer_buffer_length 
= buffer_length;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></SPAN><SPAN 
lang=PT-BR style="FONT-FAMILY: 宋体">urb-&gt;complete = 
complete;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=PT-BR 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>urb-&gt;context = 
context;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=PT-BR 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></SPAN><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">if (dev-&gt;speed == 
USB_SPEED_HIGH)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></SPAN><SPAN 
lang=PT-BR style="FONT-FAMILY: 宋体">urb-&gt;interval = 1 &lt;&lt; (interval - 
1);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=PT-BR 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>else<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=PT-BR 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>urb-&gt;interval 
= interval;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=PT-BR 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>urb-&gt;start_frame 
= -1;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=PT-BR style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=PT-BR style="FONT-FAMILY: 宋体">}<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
style="FONT-FAMILY: 宋体">此处只是构建好一个<SPAN lang=PT-BR>urb</SPAN>，在<SPAN 
lang=PT-BR>open</SPAN>方法中会实现向<SPAN lang=PT-BR>usb core</SPAN>递交<SPAN 
lang=PT-BR>urb<O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=PT-BR style="FONT-FAMILY: 宋体">*/<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>mouse-&gt;irq-&gt;transfer_dma 
= mouse-&gt;data_dma;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></SPAN><SPAN 
lang=PT-BR style="FONT-FAMILY: 宋体">mouse-&gt;irq-&gt;transfer_flags |= 
URB_NO_TRANSFER_DMA_MAP;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=PT-BR style="FONT-FAMILY: 宋体">/*<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=PT-BR style="FONT-FAMILY: 宋体">#define 
URB_NO_TRANSFER_DMA_MAP<SPAN>&nbsp;</SPAN>0x0004<SPAN>&nbsp;&nbsp;</SPAN>//urb-&gt;transfer_dma 
valid on submit<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=PT-BR style="FONT-FAMILY: 宋体">#define 
URB_NO_SETUP_DMA_MAP<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>0x0008<SPAN>&nbsp;&nbsp;</SPAN>//urb-&gt;setup_dma 
valid on submit<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=PT-BR style="FONT-FAMILY: 宋体">,</SPAN><SPAN 
style="FONT-FAMILY: 宋体">这里是两个</SPAN><SPAN lang=PT-BR 
style="FONT-FAMILY: 宋体">DMA&nbsp;</SPAN><SPAN 
style="FONT-FAMILY: 宋体">相关的</SPAN><SPAN lang=PT-BR 
style="FONT-FAMILY: 宋体">flag,</SPAN><SPAN 
style="FONT-FAMILY: 宋体">一个是</SPAN><SPAN lang=PT-BR 
style="FONT-FAMILY: 宋体">URB_NO_SETUP_DMA_MAP,</SPAN><SPAN 
style="FONT-FAMILY: 宋体">而另一个是</SPAN><SPAN lang=PT-BR 
style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=PT-BR style="FONT-FAMILY: 宋体">URB_NO_TRANSFER_DMA_MAP.</SPAN><SPAN 
style="FONT-FAMILY: 宋体">注意</SPAN><SPAN 
style="FONT-FAMILY: 宋体">这两个是不一样的</SPAN><SPAN lang=PT-BR 
style="FONT-FAMILY: 宋体">,</SPAN><SPAN 
style="FONT-FAMILY: 宋体">前一个是专门为控制传输准备的</SPAN><SPAN lang=PT-BR 
style="FONT-FAMILY: 宋体">,</SPAN><SPAN 
style="FONT-FAMILY: 宋体">因为只有控制传输需要有这么一个<SPAN 
lang=EN-US>setup&nbsp;</SPAN>阶段需要准备一个<SPAN lang=EN-US>setup packet</SPAN>。<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">transfer_buffer&nbsp;</SPAN><SPAN 
style="FONT-FAMILY: 宋体">是给各种传输方式中真正用来数据传输的<SPAN lang=EN-US>,</SPAN>而<SPAN 
lang=EN-US>setup_packet&nbsp;</SPAN>仅仅是在控制传输中发送<SPAN 
lang=EN-US>setup&nbsp;</SPAN>的包<SPAN lang=EN-US>,</SPAN>控制传输除了<SPAN 
lang=EN-US>setup&nbsp;</SPAN>阶段之外<SPAN lang=EN-US>,</SPAN>也会有数据传输阶段<SPAN 
lang=EN-US>,</SPAN>这一阶段要传输数据还是得靠<SPAN 
lang=EN-US>transfer_buffer,</SPAN>而如果使用<SPAN lang=EN-US>dma&nbsp;</SPAN>方式<SPAN 
lang=EN-US>,</SPAN>那么就是使用<SPAN 
lang=EN-US>transfer_dma.<O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
style="FONT-FAMILY: 宋体">因为这里使用了<SPAN lang=EN-US>mouse-&gt;irq-&gt;transfer_flags 
|= URB_NO_TRANSFER_DMA_MAP,</SPAN>所以应该给<SPAN lang=EN-US>urb</SPAN>的<SPAN 
lang=EN-US>transfer_dma</SPAN>赋值。所以用了：<SPAN 
lang=EN-US>mouse-&gt;irq-&gt;transfer_dma = 
mouse-&gt;data_dma;<O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=PT-BR style="FONT-FAMILY: 宋体">*/<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=PT-BR style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=PT-BR style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=PT-BR 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></SPAN><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体">input_register_device(&amp;mouse-&gt;dev);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">//</SPAN><SPAN style="FONT-FAMILY: 宋体">向<SPAN 
lang=EN-US>input</SPAN>系统注册<SPAN lang=EN-US>input</SPAN>设备<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>printk(KERN_INFO 
"input: %s on %s\n", mouse-&gt;name, path);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>usb_set_intfdata(intf, 
mouse);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">/*<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; TEXT-ALIGN: left; webkit-background-clip: initial; webkit-background-origin: initial" 
align=left><FONT size=3><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">usb_set_intfdata().</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">的结果就是使得<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></FONT></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; TEXT-ALIGN: left; webkit-background-clip: initial; webkit-background-origin: initial" 
align=left><FONT size=3><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">%intf-&gt;dev-&gt;driver_data=</SPAN><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">&nbsp;mouse</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">而其它函数中会调用</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">usb_get_intfdata(intf)</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">的作用就是把</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">mouse</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">从中取出来</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana"><O:P></O:P></SPAN></FONT></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">*/<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>return 
0;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">}<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 黑体"><SPAN>三、<SPAN 
style="FONT: 7pt '', 'Times New Roman', ''"><FONT 
size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></SPAN></SPAN></SPAN><SPAN 
lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 黑体">open</SPAN><SPAN 
style="FONT-SIZE: 12pt; FONT-FAMILY: 黑体">部分<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
style="FONT-FAMILY: 宋体">当应用层打开鼠标设备时，<SPAN 
lang=EN-US>usb_mouse_open</SPAN>将被调用<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">static int usb_mouse_open(struct input_dev 
*dev)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">{<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>struct 
usb_mouse *mouse = dev-&gt;private;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>mouse-&gt;irq-&gt;dev 
= mouse-&gt;usbdev;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
(usb_submit_urb(mouse-&gt;irq, GFP_KERNEL))<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>return 
-EIO;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">//</SPAN><SPAN style="FONT-FAMILY: 宋体">向<SPAN 
lang=EN-US>usb core</SPAN>递交了在<SPAN lang=EN-US>probe</SPAN>中构建好的中断<SPAN 
lang=EN-US>urb</SPAN>，注意：此处是成功递交给<SPAN lang=EN-US>usb 
core</SPAN>以后就返回，而不是等到从设备取得鼠标数据。<SPAN lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>return 
0;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">}<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 黑体"><SPAN>四、<SPAN 
style="FONT: 7pt '', 'Times New Roman', ''"><FONT 
size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></SPAN></SPAN></SPAN><SPAN 
lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 黑体">urb</SPAN><SPAN 
style="FONT-SIZE: 12pt; FONT-FAMILY: 黑体">回调函数处理部分<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
style="FONT-FAMILY: 宋体">当出现传输错误或获取到鼠标数据后，<SPAN 
lang=EN-US>urb</SPAN>回调函数将被执行<SPAN lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">static void usb_mouse_irq(struct urb *urb, 
struct pt_regs *regs)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">{<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>struct 
usb_mouse *mouse = urb-&gt;context;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">//</SPAN><SPAN style="FONT-FAMILY: 宋体">在<SPAN 
lang=EN-US>usb_fill_int_urb</SPAN>中有对<SPAN 
lang=EN-US>urb-&gt;context</SPAN>赋值<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>signed 
char *data = mouse-&gt;data;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>struct 
input_dev *dev = &amp;mouse-&gt;dev;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>int 
status;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>switch 
(urb-&gt;status) {<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>case 
0:<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>/* 
success */<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>break;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>case 
-ECONNRESET:<SPAN>&nbsp;&nbsp;&nbsp;</SPAN>/* unlink */<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>case 
-ENOENT:<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>case 
-ESHUTDOWN:<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>return;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>/* 
-EPIPE:<SPAN>&nbsp;&nbsp;</SPAN>should clear the halt */<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>default:<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>/* 
error */<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>goto 
resubmit;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>}<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>input_regs(dev, 
regs);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>input_report_key(dev, 
BTN_LEFT,<SPAN>&nbsp;&nbsp;&nbsp;</SPAN>data[0] &amp; 
0x01);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>input_report_key(dev, 
BTN_RIGHT,<SPAN>&nbsp;&nbsp;</SPAN>data[0] &amp; 0x02);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>input_report_key(dev, 
BTN_MIDDLE, data[0] &amp; 0x04);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>input_report_key(dev, 
BTN_SIDE,<SPAN>&nbsp;&nbsp;&nbsp;</SPAN>data[0] &amp; 
0x08);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>input_report_key(dev, 
BTN_EXTRA,<SPAN>&nbsp;&nbsp;</SPAN>data[0] &amp; 0x10);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">//</SPAN><SPAN style="FONT-FAMILY: 宋体">向<SPAN 
lang=EN-US>input</SPAN>系统报告<SPAN lang=EN-US>key</SPAN>事件，分别是鼠标<SPAN 
lang=EN-US>LEFT</SPAN>、<SPAN lang=EN-US>RIGHT</SPAN>、<SPAN 
lang=EN-US>MIDDLE</SPAN>、<SPAN lang=EN-US>SIDE</SPAN>、<SPAN 
lang=EN-US>EXTRA</SPAN>键<SPAN lang=EN-US>,<O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">static inline void input_report_key(struct 
input_dev *dev, unsigned int code, int value)</SPAN><SPAN 
style="FONT-FAMILY: 宋体">中的<SPAN lang=EN-US>value</SPAN>非<SPAN 
lang=EN-US>0</SPAN>时表示按下，<SPAN lang=EN-US>0</SPAN>表示释放<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>input_report_rel(dev, 
REL_X,<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>data[1]);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>input_report_rel(dev, 
REL_Y,<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>data[2]);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>input_report_rel(dev, 
REL_WHEEL, data[3]);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">//</SPAN><SPAN style="FONT-FAMILY: 宋体">向<SPAN 
lang=EN-US>input</SPAN>系统报告<SPAN lang=EN-US>rel</SPAN>事件，分别是<SPAN 
lang=EN-US>x</SPAN>方向位移、<SPAN lang=EN-US>y</SPAN>方向位移、<SPAN 
lang=EN-US>wheel</SPAN>值<SPAN lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>input_sync(dev);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial">//</SPAN><SPAN 
style="FONT-FAMILY: 宋体; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial">最后需要向事件接受者发送一个完整的报告。这是<SPAN 
lang=EN-US>input</SPAN>系统的要求。</SPAN><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">resubmit:<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>status = 
usb_submit_urb (urb, SLAB_ATOMIC);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px; BACKGROUND-COLOR: silver; webkit-background-clip: initial; webkit-background-origin: initial"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">//</SPAN><SPAN 
style="FONT-FAMILY: 宋体">重新递交<SPAN lang=EN-US>urb<O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if 
(status)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>err 
("can''t resubmit intr, %s-%s/input0, status %d",<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>mouse-&gt;usbdev-&gt;bus-&gt;bus_name,<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>mouse-&gt;usbdev-&gt;devpath, 
status);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">}<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 黑体"><SPAN>五、<SPAN 
style="FONT: 7pt '', 'Times New Roman', ''"><FONT 
size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></SPAN></SPAN></SPAN><SPAN 
style="FONT-SIZE: 12pt; FONT-FAMILY: 黑体">应用层测试代码编写<SPAN 
lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
style="FONT-FAMILY: 宋体">在应用层编写测试鼠标的测试程序，在我的系统中，鼠标设备为<SPAN 
lang=EN-US>/dev/input/event3.<O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
style="FONT-FAMILY: 宋体">测试代码如下：<SPAN lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">/*<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;</SPAN>* 
usb_mouse_test.c<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;</SPAN>*by 
lht<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;</SPAN>*/<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体">#include<STDIO.H><O:P></O:P></STDIO.H></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">#include<SYS 
types.h=""><O:P></O:P></SYS></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体">#include<UNISTD.H><O:P></O:P></UNISTD.H></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体">#include<FCNTL.H><O:P></O:P></FCNTL.H></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">#include<LINUX 
input.h=""><O:P></O:P></LINUX></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">int main (void)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">{<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>int 
fd,i,count;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>struct 
input_event ev_mouse[2];<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>fd = 
open ("/dev/input/event3",O_RDWR);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if (fd 
&lt; 0) {<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;</SPAN>printf 
("fd open failed\n");<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;</SPAN>exit(0);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>}<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>printf 
("\nmouse opened, fd=%d\n",fd);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>while(1)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>{<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>printf("...............................................\n");<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>count=read(fd, 
ev_mouse, sizeof(struct input_event));<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>for(i=0;i&lt;(int)count/sizeof(struct 
input_event);i++)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>{<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>printf("type=%d\n",ev_mouse[i].type);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if(EV_REL==ev_mouse[i].type)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>{<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>printf("time:%ld.%d",ev_mouse[i].time.tv_sec,ev_mouse[i].time.tv_usec);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>printf(" 
type:%d code:%d 
value:%d\n",ev_mouse[i].type,ev_mouse[i].code,ev_mouse[i].value);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>}<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if(EV_KEY==ev_mouse[i].type)<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>{<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>printf("time:%ld.%d",ev_mouse[i].time.tv_sec,ev_mouse[i].time.tv_usec);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>printf(" 
type:%d code:%d 
value:%d\n",ev_mouse[i].type,ev_mouse[i].code,ev_mouse[i].value);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>}<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>}<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>}<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>close 
(fd);<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>return 
0;<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">}<O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><O:P></O:P></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
style="FONT-FAMILY: 宋体">运行结果如下：</SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
style="FONT-FAMILY: 宋体"><IMG 
style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
alt="" 
src="usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files/20081017050409image002.jpg" 
border=0><SPAN lang=EN-US><O:P></O:P></SPAN></SPAN></P>
<P class=MsoNormal 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><V:SHAPETYPE id=_x0000_t75 
coordsize="21600,21600" o:spt="75" o:preferrelative="t" 
path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"><V:STROKE 
joinstyle="miter"></V:STROKE><V:FORMULAS><V:F 
eqn="if lineDrawn pixelLineWidth 0"></V:F><V:F eqn="sum @0 1 0"></V:F><V:F 
eqn="sum 0 0 @1"></V:F><V:F eqn="prod @2 1 2"></V:F><V:F 
eqn="prod @3 21600 pixelWidth"></V:F><V:F 
eqn="prod @3 21600 pixelHeight"></V:F><V:F eqn="sum @0 0 1"></V:F><V:F 
eqn="prod @6 1 2"></V:F><V:F eqn="prod @7 21600 pixelWidth"></V:F><V:F 
eqn="sum @8 21600 0"></V:F><V:F eqn="prod @7 21600 pixelHeight"></V:F><V:F 
eqn="sum @10 21600 0"></V:F></V:FORMULAS><V:PATH o:extrusionok="f" 
gradientshapeok="t" o:connecttype="rect"></V:PATH><O:LOCK v:ext="edit" 
aspectratio="t"></O:LOCK></V:SHAPETYPE><O:P></O:P></SPAN></P>
<P 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0.5em; TEXT-INDENT: 2em; LINE-HEIGHT: 22px; PADDING-TOP: 0px"><SPAN 
style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体"><FONT size=3>根据<SPAN 
lang=EN-US>type</SPAN>、<SPAN lang=EN-US>code</SPAN>、<SPAN 
lang=EN-US>value</SPAN>的值，可以判断出鼠标的状态，具体值参考<SPAN 
lang=EN-US>include/linux/input.h</SPAN></FONT></SPAN></P></SPAN>
<DIV class=postDesc>posted on 2008-10-25 23:17 <A 
href="http://www.cppblog.com/yishanhante/">jay</A> 阅读(63) <A 
href="http://www.cppblog.com/yishanhante/articles/65041.html#Post">评论(0)</A> 
&nbsp;<A 
href="http://www.cppblog.com/yishanhante/admin/EditArticles.aspx?postid=65041">编辑</A>&nbsp;<A 
href="http://www.cppblog.com/yishanhante/AddToFavorite.aspx?id=65041">收藏</A> <A 
href="http://www.cppblog.com/yishanhante/services/trackbacks/65041.aspx">引用</A> 
所属分类: <A href="http://www.cppblog.com/yishanhante/category/8628.html">驱动</A> 
</DIV></DIV><IMG height=1 
src="usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files/65041.jpg" width=1> <!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
<rdf:Description
rdf:about="http://www.cppblog.com/yishanhante/articles/65041.html"
dc:identifier="http://www.cppblog.com/yishanhante/articles/65041.html"
dc:title="usb鼠标驱动注解及测试【转】"
trackback:ping="http://www.cppblog.com/yishanhante/services/trackbacks/65041.aspx" />
</rdf:RDF>
-->
<SCRIPT type=text/javascript>
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('AjaxHolder$scriptmanager1', document.getElementById('Form1'));
Sys.WebForms.PageRequestManager.getInstance()._updateControls(['tAjaxHolder$UpdatePanel1'], [], [], 90);
//]]>
</SCRIPT>

<DIV id=AjaxHolder_UpdatePanel1>
<STYLE>TD {
	FONT-SIZE: 12px
}
.commentTextBox {
	FONT-SIZE: 13px; FONT-FAMILY: Verdana
}
</STYLE>
<!--Beging Temp Save-->
<STYLE>.userData {
	BEHAVIOR: url(#default#userdata)
}
</STYLE>

<DIV class=userData id=CommentsPersistDiv></DIV>
<SCRIPT type=text/javascript>
function pageLoad()
{
    Sys.WebForms.PageRequestManager.getInstance().add_initializeRequest(handleInitializeRequest);
    //Sys.WebForms.PageRequestManager.getInstance().add_endRequest(handleEndRequest);
}

function handleInitializeRequest(sender, args)
{
    var prm = Sys.WebForms.PageRequestManager.getInstance();
    var eid = args.get_postBackElement().id;
    if (eid.indexOf("DeleteLink")>0) 
    {
       args.get_postBackElement().innerHTML = "<font color='red'>正在删除...</font>";         
    }    
    if (eid.indexOf("btnSubmit")>0) 
    {
       document.getElementById("AjaxHolder_PostComment_ltSubmitMsg").innerHTML="正在提交...";
       document.getElementById("AjaxHolder_PostComment_btnSubmit").disabled = true;
       
    }    
   
}	

function TempSave(ElementID)
{
	try
	{
	CommentsPersistDiv.setAttribute("CommentContent",document.getElementById(ElementID).value);
	CommentsPersistDiv.save("CommentXMLStore");
	}
	catch(ex)
	{
	}
	
}
function Restore(ElementID)
{
	CommentsPersistDiv.load("CommentXMLStore");
	document.getElementById(ElementID).value=CommentsPersistDiv.getAttribute("CommentContent");
}	
			
			
</SCRIPT>
<!--Ene TempSave-->
<DIV class=commentform>
<SCRIPT src="usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files/google_service.js" 
type=text/javascript>
</SCRIPT>

<SCRIPT type=text/javascript>
try{
  GS_googleAddAdSenseService("ca-pub-4210569241504288");
  GS_googleEnableAllServices();
  } catch (e) { }
</SCRIPT>

<SCRIPT type=text/javascript>
try{
  GA_googleAddSlot("ca-pub-4210569241504288", "cppblog_blogpost_bottom");
  GA_googleAddSlot("ca-pub-4210569241504288", "cppblog_commentbox_up");
  } catch (e) { }
</SCRIPT>

<SCRIPT type=text/javascript>
try{
  GA_googleFetchAds();
  } catch (e) { }
</SCRIPT>
<SPAN id=AjaxHolder_PostComment_ltSubmitMsg style="COLOR: red"></SPAN><BR><A 
name=Feedback></A>
<TABLE cellSpacing=1 cellPadding=1 border=0>
  <TBODY>
  <TR>
    <TD colSpan=3>
      <DIV class=other_info_list id=itnews_block 
      style="LINE-HEIGHT: 180%">IT新闻：<BR>· <A 
      href="http://news.cnblogs.com/n/59612/" target=_blank>Adobe 
      CEO：iPhone无法使用Flash归咎于苹果</A><BR>· <A 
      href="http://news.cnblogs.com/n/59611/" target=_blank>IT精英转型 
      靠网络将产品卖至欧美特种部队</A><BR>· <A href="http://news.cnblogs.com/n/59610/" 
      target=_blank>苹果App Store：池塘大 必然龙蛇混杂</A><BR>· <A 
      href="http://news.cnblogs.com/n/59609/" 
      target=_blank>苹果也要踏进在线社区市场</A><BR>· <A 
      href="http://news.cnblogs.com/n/59607/" target=_blank>人民网：陈晓薇离职 
      朱骏能稳坐钓鱼台?</A><BR></DIV>专题：<A href="http://kb.cnblogs.com/zt/android/" 
      target=_blank>Android</A>&nbsp; <A href="http://kb.cnblogs.com/zt/iPad/" 
      target=_blank>iPad</A> <A href="http://kb.cnblogs.com/zt/jquery/" 
      target=_blank>jQuery</A> <A href="http://kb.cnblogs.com/zt/chrome/" 
      target=_blank>Chrome OS</A><BR></TD></TR>
  <TR>
    <TD colSpan=3>
      <SCRIPT type=Text/Javascript>
try{
  GA_googleFillSlot("cppblog_commentbox_up");
  } catch (e) { }
</SCRIPT>
      <BR></TD></TR>
  <TR>
    <TD width=75></TD>
    <TD></TD>
    <TD></TD></TR>
  <TR>
    <TD></TD>
    <TD colSpan=2><A href="http://www.cnblogs.com/" 
      target=_blank>博客园首页</A>&nbsp; <A href="http://news.cnblogs.com/" 
      target=_blank>IT新闻</A>&nbsp; <!--<a href="http://home.cnblogs.com/ing/" target="_blank">闪存</a>&nbsp;  --><A 
      href="http://kb.cnblogs.com/" target=_blank>知识库</A>&nbsp; <A 
      href="http://a4.yeshj.com/rd/34143/" target=_blank>学英语</A>&nbsp; <A 
      href="http://job.cnblogs.com/cate-cpp_programmer/" 
      target=_blank>C++程序员招聘</A> </TD></TR>
  <TR>
    <TD width=55>标题</TD>
    <TD><INPUT class=commenttb id=AjaxHolder_PostComment_tbTitle 
      style="WIDTH: 320px" value="re: usb鼠标驱动注解及测试【转】" 
      name=AjaxHolder$PostComment$tbTitle></TD>
    <TD><SPAN id=AjaxHolder_PostComment_RequiredFieldValidator1 
      style="VISIBILITY: hidden; COLOR: red">请输入标题</SPAN></TD></TR>
  <TR>
    <TD>姓名</TD>
    <TD><INPUT class=commenttb id=AjaxHolder_PostComment_tbName 
      style="WIDTH: 320px" name=AjaxHolder$PostComment$tbName></TD>
    <TD><SPAN id=AjaxHolder_PostComment_RequiredFieldValidator2 
      style="VISIBILITY: hidden; COLOR: red">请输入你的姓名</SPAN></TD></TR>
  <TR>
    <TD>主页</TD>
    <TD><INPUT class=commenttb id=AjaxHolder_PostComment_tbUrl 
      style="WIDTH: 320px" name=AjaxHolder$PostComment$tbUrl></TD>
    <TD><FONT face=宋体></FONT></TD></TR>
  <TR>
    <TD align=left colSpan=3>
      <TABLE class=CommentForm id=AjaxHolder_PostComment_tbCaptchaImage 
      cellSpacing=0 cellPadding=0 border=0>
        <TBODY>
        <TR>
          <TD colSpan=3><SPAN 
            id=AjaxHolder_PostComment_Requiredfieldvalidator4 
            style="DISPLAY: none; COLOR: red">请输入验证码</SPAN> <SPAN 
            id=AjaxHolder_PostComment_lblImage 
            style="FONT-WEIGHT: bold; COLOR: red"></SPAN></TD></TR>
        <TR>
          <TD width=78>验证码</TD>
          <TD><INPUT id=AjaxHolder_PostComment_CodeNumberTextBox 
            name=AjaxHolder$PostComment$CodeNumberTextBox>*</TD>
          <TD align=left><IMG id=AjaxHolder_PostComment_Img1 
            src="usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files/JpegImage.jpg"> 
          </TD></TR></TBODY></TABLE></TD></TR>
  <TR>
    <TD colSpan=3>内容(提交失败后,可以通过“恢复上次提交”恢复刚刚提交的内容) <SPAN 
      id=AjaxHolder_PostComment_RequiredFieldValidator3 
      style="VISIBILITY: hidden; COLOR: red">请输入评论内容</SPAN><BR><TEXTAREA class=commentTextBox id=AjaxHolder_PostComment_tbComment onkeydown="ctlent(event,'AjaxHolder_PostComment_tbComment')" style="WIDTH: 480px; HEIGHT: 220px" name=AjaxHolder$PostComment$tbComment rows=10 cols=50></TEXTAREA></TD></TR>
  <TR>
    <TD colSpan=3><SPAN id=AjaxHolder_PostComment_Message 
      style="COLOR: red"></SPAN></TD>
  <TR>
    <TD colSpan=3><INPUT id=AjaxHolder_PostComment_chkRemember tabIndex=-1 
      type=checkbox CHECKED name=AjaxHolder$PostComment$chkRemember><LABEL 
      for=AjaxHolder_PostComment_chkRemember>Remember Me?</LABEL></TD></TR>
  <TR>
    <TD height=23><INPUT id=AjaxHolder_PostComment_btnSubmit onclick="TempSave('AjaxHolder_PostComment_tbComment');WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;AjaxHolder$PostComment$btnSubmit&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" type=submit value=提交 name=AjaxHolder$PostComment$btnSubmit> 
    </TD>
    <TD colSpan=2 height=23>&nbsp; <A id=AjaxHolder_PostComment_lnkLogin 
      href="http://www.cppblog.com/login.aspx?ReturnURL=http://www.cppblog.com/yishanhante/articles/65041.html&amp;SourceURL=/yishanhante/articles/65041.html">登录</A>&nbsp;&nbsp;<A 
      id=AjaxHolder_PostComment_linkLoginComment 
      onclick="if(document.getElementById('AjaxHolder_PostComment_tbComment').value != '') return confirm('未提交的评论内容将会丢失, 你真的要进入高级评论吗?');" 
      href="http://www.cppblog.com/yishanhante/articles/65041.html?login=1#Post">使用高级评论</A>&nbsp;&nbsp;<A 
      href="http://www.cppblog.com/RequireRegister.aspx">新用户注册</A>&nbsp;&nbsp;<A 
      href="http://www.cppblog.com/yishanhante/articles/65041.html#Top">返回页首</A>&nbsp;&nbsp;<A 
      id=AjaxHolder_PostComment_lbRestore 
      onclick="Restore('AjaxHolder_PostComment_tbComment'); return false;" 
      href="http://www.cppblog.com/yishanhante/articles/65041.html#Post">恢复上次提交</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    </TD></TR>
  <TR>
    <TD colSpan=3>[使用Ctrl+Enter键可以直接提交]</TD></TR>
  <TR>
    <TD colSpan=3><A href="http://a4.yeshj.com/rd/34138/" target=_blank><SPAN 
      style="COLOR: red">每天10分钟，轻松学英语</SPAN></A> </TD></TR>
  <TR>
    <TD colSpan=3>
      <SCRIPT type=text/javascript>
		try{
		  GA_googleFillSlot("cppblog_blogpost_bottom");
		  } catch (e) { }
		</SCRIPT>
    </TD></TR>
  <TR>
    <TD colSpan=3>
      <DIV id=job_block style="LINE-HEIGHT: 180%">推荐职位：<BR>· <A 
      href="http://job.cnblogs.com/offer/6318/" 
      target=_blank>飞信服务器端高级.NET开发工程师(新媒传信)</A><BR>· <A 
      href="http://job.cnblogs.com/offer/6319/" 
      target=_blank>.NET飞信官网开发工程师(新媒传信)</A><BR>· <A 
      href="http://job.cnblogs.com/offer/6189/" 
      target=_blank>.NET技术开发总监(广州衣酷)</A><BR>· <A 
      href="http://job.cnblogs.com/offer/6492/" 
      target=_blank>Web前端研发工程师(百度)</A><BR>· <A 
      href="http://job.cnblogs.com/offer/6123/" target=_blank>.NET初级程序员 
      (北京安人)</A><BR>· <A href="http://job.cnblogs.com/offer/6124/" 
      target=_blank>.NET中级程序员 (北京安人)</A><BR>· <A 
      href="http://job.cnblogs.com/zt/yeshj/#offer3" 
      target=_blank>软件开发工程师(沪江网)</A><BR>· <A 
      href="http://job.cnblogs.com/zt/yeshj/#offer2" 
      target=_blank>前端开发工程师(沪江网)</A><BR></DIV>
      <DIV id=cnblogs_posts style="LINE-HEIGHT: 180%">博客园首页随笔：<BR>· <A 
      href="http://www.cnblogs.com/jimmyjiang/archive/2010/03/24/1693982.html" 
      target=_blank>建设性的思维</A><BR>· <A 
      href="http://www.cnblogs.com/and/archive/2010/03/24/1693970.html" 
      target=_blank>.net程序员应该掌握的常用类库</A><BR>· <A 
      href="http://www.cnblogs.com/robertzml/archive/2010/03/24/1692737.html" 
      target=_blank>学习Emacs系列教程（十）：多窗口</A><BR>· <A 
      href="http://www.cnblogs.com/houbowei/archive/2010/03/24/1693939.html" 
      target=_blank>你的代码完成了吗？（之二）——可维护性和规范性</A><BR>· <A 
      href="http://www.cnblogs.com/mingle/archive/2010/03/24/moss-cache.html" 
      target=_blank>解读Sharepoint日志——输出缓存</A><BR></DIV>
      <DIV id=job_block style="LINE-HEIGHT: 180%">知识库：<BR>· <A 
      href="http://kb.cnblogs.com/page/59608/" 
      target=_blank>30个可以改变你生活的好习惯</A><BR>· <A 
      href="http://kb.cnblogs.com/page/59599/" 
      target=_blank>为什么公司招聘一个好员工很难，程序员找份好工作也不容易</A><BR>· <A 
      href="http://kb.cnblogs.com/page/59592/" target=_blank>小众化的 Web 
      OS</A><BR>· <A href="http://kb.cnblogs.com/page/59591/" 
      target=_blank>从模仿到创新：Web 设计中的中国风(上)</A><BR>· <A 
      href="http://kb.cnblogs.com/page/59589/" 
      target=_blank>我们如何从VC++开始“编程”？</A><BR></DIV></TD></TR>
  <TR>
    <TD colSpan=3 height=5></TD></TR>
  <TR>
    <TD colSpan=3></TD></TR>
  <TR>
    <TD colSpan=3 height=1>网站导航:
      <DIV id=blogsite><A href="http://www.cnblogs.com/">博客园</A>&nbsp;&nbsp; <A 
      href="http://news.cnblogs.com/">IT新闻</A>&nbsp;&nbsp; <A 
      href="http://home.cnblogs.com/">博客园个人主页</A>&nbsp;&nbsp; <A 
      href="http://www.blogjava.net/">BlogJava</A>&nbsp;&nbsp; <A 
      href="http://www.cnweblog.com/">博客生活</A>&nbsp;&nbsp; <A 
      href="http://www.cnitblog.com/">IT博客网</A>&nbsp;&nbsp; <A 
      href="http://www.phpweblog.net/">PHP博客</A>&nbsp;&nbsp; <A 
      href="http://space.cnblogs.com/">博客园社区</A>&nbsp;&nbsp; <A 
      href="http://www.cppblog.com/yishanhante/articles/65041.html?opt=admin">管理</A> 
      </DIV></TD></TR>
  <TR>
    <TD colSpan=3><BR><BR></TD></TR></TBODY></TABLE></DIV>
<DIV id=AjaxHolder_PostComment_ValidationSummary1 
style="DISPLAY: none; COLOR: red"></DIV></DIV></DIV>
<DIV id=leftcontent style="DISPLAY: none">
<DIV id=leftcontentcontainer><!--done-->
<DIV class=newsItem><IMG 
src="usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files/counter.gif"> <EMBED 
src=http://www.souxp.com/fzjzykj/previews/clocks/clock47.swf width=150 height=40 
menu="false" volume="0" loop="true" quality="high" wmode="transparent"> <A 
href="http://www.ip.cn/" target=_blank><IMG src=""></A> </DIV>
<TABLE class=Cal id=Calendar1_entryCal title=Calendar 
style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid; BORDER-COLLAPSE: collapse" 
cellSpacing=0 cellPadding=0 border=0>
  <TBODY>
  <TR>
    <TD style="BACKGROUND-COLOR: silver" colSpan=7>
      <TABLE class=CalTitle style="WIDTH: 100%; BORDER-COLLAPSE: collapse" 
      cellSpacing=0 border=0>
        <TBODY>
        <TR>
          <TD class=CalNextPrev style="WIDTH: 15%"><A 
            title="Go to the previous month" style="COLOR: black" 
            href="javascript:__doPostBack('Calendar1$entryCal','V3684')">&lt;</A></TD>
          <TD style="WIDTH: 70%" align=middle>2010年3月</TD>
          <TD class=CalNextPrev style="WIDTH: 15%" align=right><A 
            title="Go to the next month" style="COLOR: black" 
            href="javascript:__doPostBack('Calendar1$entryCal','V3743')">&gt;</A></TD></TR></TBODY></TABLE></TD></TR>
  <TR>
    <TH class=CalDayHeader scope=col align=middle abbr=日>日</TH>
    <TH class=CalDayHeader scope=col align=middle abbr=一>一</TH>
    <TH class=CalDayHeader scope=col align=middle abbr=二>二</TH>
    <TH class=CalDayHeader scope=col align=middle abbr=三>三</TH>
    <TH class=CalDayHeader scope=col align=middle abbr=四>四</TH>
    <TH class=CalDayHeader scope=col align=middle abbr=五>五</TH>
    <TH class=CalDayHeader scope=col align=middle abbr=六>六</TH></TR>
  <TR>
    <TD class=CalOtherMonthDay style="WIDTH: 14%" align=middle>28</TD>
    <TD style="WIDTH: 14%" align=middle>1</TD>
    <TD style="WIDTH: 14%" align=middle>2</TD>
    <TD style="WIDTH: 14%" align=middle>3</TD>
    <TD style="WIDTH: 14%" align=middle>4</TD>
    <TD style="WIDTH: 14%" align=middle>5</TD>
    <TD class=CalWeekendDay style="WIDTH: 14%" align=middle>6</TD></TR>
  <TR>
    <TD class=CalWeekendDay style="WIDTH: 14%" align=middle>7</TD>
    <TD style="WIDTH: 14%" align=middle>8</TD>
    <TD style="WIDTH: 14%" align=middle>9</TD>
    <TD style="WIDTH: 14%" align=middle>10</TD>
    <TD style="WIDTH: 14%" align=middle>11</TD>
    <TD style="WIDTH: 14%" align=middle>12</TD>
    <TD class=CalWeekendDay style="WIDTH: 14%" align=middle>13</TD></TR>
  <TR>
    <TD class=CalWeekendDay style="WIDTH: 14%" align=middle>14</TD>
    <TD style="WIDTH: 14%" align=middle>15</TD>
    <TD style="WIDTH: 14%" align=middle>16</TD>
    <TD style="WIDTH: 14%" align=middle>17</TD>
    <TD style="WIDTH: 14%" align=middle>18</TD>
    <TD style="WIDTH: 14%" align=middle>19</TD>
    <TD class=CalWeekendDay style="WIDTH: 14%" align=middle>20</TD></TR>
  <TR>
    <TD class=CalWeekendDay style="WIDTH: 14%" align=middle>21</TD>
    <TD style="WIDTH: 14%" align=middle>22</TD>
    <TD style="WIDTH: 14%" align=middle>23</TD>
    <TD class=CalTodayDay style="WIDTH: 14%" align=middle>24</TD>
    <TD style="WIDTH: 14%" align=middle>25</TD>
    <TD style="WIDTH: 14%" align=middle>26</TD>
    <TD class=CalWeekendDay style="WIDTH: 14%" align=middle>27</TD></TR>
  <TR>
    <TD class=CalWeekendDay style="WIDTH: 14%" align=middle>28</TD>
    <TD style="WIDTH: 14%" align=middle>29</TD>
    <TD style="WIDTH: 14%" align=middle>30</TD>
    <TD style="WIDTH: 14%" align=middle>31</TD>
    <TD class=CalOtherMonthDay style="WIDTH: 14%" align=middle>1</TD>
    <TD class=CalOtherMonthDay style="WIDTH: 14%" align=middle>2</TD>
    <TD class=CalOtherMonthDay style="WIDTH: 14%" align=middle>3</TD></TR>
  <TR>
    <TD class=CalOtherMonthDay style="WIDTH: 14%" align=middle>4</TD>
    <TD class=CalOtherMonthDay style="WIDTH: 14%" align=middle>5</TD>
    <TD class=CalOtherMonthDay style="WIDTH: 14%" align=middle>6</TD>
    <TD class=CalOtherMonthDay style="WIDTH: 14%" align=middle>7</TD>
    <TD class=CalOtherMonthDay style="WIDTH: 14%" align=middle>8</TD>
    <TD class=CalOtherMonthDay style="WIDTH: 14%" align=middle>9</TD>
    <TD class=CalOtherMonthDay style="WIDTH: 14%" 
align=middle>10</TD></TR></TBODY></TABLE><BR>
<H3>常用链接</H3>
<UL>
  <LI><A id=SingleColumn1_ctl00_repeaterLinks_ctl01_lnkLinkItem 
  href="http://www.cppblog.com/yishanhante/MyPosts.html">我的随笔</A> 
  <LI><A id=SingleColumn1_ctl00_repeaterLinks_ctl02_lnkLinkItem 
  href="http://www.cppblog.com/yishanhante/MyComments.html">我的评论</A> 
  <LI><A id=SingleColumn1_ctl00_repeaterLinks_ctl03_lnkLinkItem 
  href="http://www.cppblog.com/yishanhante/OtherPosts.html">我参与的随笔</A> </LI></UL>
<H3>留言簿<SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 11px">(3)</SPAN></H3>
<UL>
  <LI><A id=SingleColumn1__22c887f_lnkMessages 
  href="http://www.cppblog.com/yishanhante/Contact.aspx?id=1">给我留言</A> 
  <LI><A id=SingleColumn1__22c887f_lnkPublicMsgView 
  href="http://www.cppblog.com/yishanhante/default.aspx?opt=msg">查看公开留言</A> 
  <LI><A id=SingleColumn1__22c887f_lnkPrivateMsgView 
  href="http://www.cppblog.com/yishanhante/admin/MyMessages.aspx">查看私人留言</A> 
  </LI></UL><!--done-->
<H1 class=catListTitle>随笔档案</H1>
<UL class=catList>
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl01_Link 
  href="http://www.cppblog.com/yishanhante/archive/2008/10.html">2008年10月 
  (1)</A> 
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl02_Link 
  href="http://www.cppblog.com/yishanhante/archive/2007/09.html">2007年9月 (1)</A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl03_Link 
  href="http://www.cppblog.com/yishanhante/archive/2007/07.html">2007年7月 (1)</A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl04_Link 
  href="http://www.cppblog.com/yishanhante/archive/2007/06.html">2007年6月 (2)</A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl05_Link 
  href="http://www.cppblog.com/yishanhante/archive/2007/04.html">2007年4月 (1)</A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl06_Link 
  href="http://www.cppblog.com/yishanhante/archive/2007/03.html">2007年3月 (4)</A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl07_Link 
  href="http://www.cppblog.com/yishanhante/archive/2007/02.html">2007年2月 (1)</A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl08_Link 
  href="http://www.cppblog.com/yishanhante/archive/2007/01.html">2007年1月 (1)</A> 
  </LI></UL>
<H1 class=catListTitle>文章分类</H1>
<UL class=catList>
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl01_Link 
  href="http://www.cppblog.com/yishanhante/category/3741.html">ATL(10)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl01_RssLink 
  title="Subscribe to ATL(10)" 
  href="http://www.cppblog.com/yishanhante/category/3741.html/rss"><IMG 
  title="Subscribe to ATL(10)" 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="C:\Documents and Settings\Administrator\桌面\usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl02_Link 
  href="http://www.cppblog.com/yishanhante/category/3660.html">C++(7)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl02_RssLink 
  title="Subscribe to C++(7)" 
  href="http://www.cppblog.com/yishanhante/category/3660.html/rss"><IMG 
  title="Subscribe to C++(7)" 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="C:\Documents and Settings\Administrator\桌面\usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl03_Link 
  href="http://www.cppblog.com/yishanhante/category/3872.html">COM(1)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl03_RssLink 
  title="Subscribe to COM(1)" 
  href="http://www.cppblog.com/yishanhante/category/3872.html/rss"><IMG 
  title="Subscribe to COM(1)" 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="C:\Documents and Settings\Administrator\桌面\usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl04_Link 
  href="http://www.cppblog.com/yishanhante/category/4556.html">DB(2)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl04_RssLink 
  title="Subscribe to DB(2)" 
  href="http://www.cppblog.com/yishanhante/category/4556.html/rss"><IMG 
  title="Subscribe to DB(2)" 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="C:\Documents and Settings\Administrator\桌面\usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl05_Link 
  href="http://www.cppblog.com/yishanhante/category/3735.html">IE编程(3)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl05_RssLink 
  title="Subscribe to IE编程(3)" 
  href="http://www.cppblog.com/yishanhante/category/3735.html/rss"><IMG 
  title="Subscribe to IE编程(3)" 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="C:\Documents and Settings\Administrator\桌面\usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl06_Link 
  href="http://www.cppblog.com/yishanhante/category/3729.html">socket(5)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl06_RssLink 
  title="Subscribe to socket(5)" 
  href="http://www.cppblog.com/yishanhante/category/3729.html/rss"><IMG 
  title="Subscribe to socket(5)" 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="C:\Documents and Settings\Administrator\桌面\usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl07_Link 
  href="http://www.cppblog.com/yishanhante/category/3726.html">VC(3)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl07_RssLink 
  title="Subscribe to VC(3)" 
  href="http://www.cppblog.com/yishanhante/category/3726.html/rss"><IMG 
  title="Subscribe to VC(3)" 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="C:\Documents and Settings\Administrator\桌面\usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl08_Link 
  href="http://www.cppblog.com/yishanhante/category/3731.html">Win32(3)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl08_RssLink 
  title="Subscribe to Win32(3)" 
  href="http://www.cppblog.com/yishanhante/category/3731.html/rss"><IMG 
  title="Subscribe to Win32(3)" 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="C:\Documents and Settings\Administrator\桌面\usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl09_Link 
  href="http://www.cppblog.com/yishanhante/category/3723.html">WTL(2)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl09_RssLink 
  title="Subscribe to WTL(2)" 
  href="http://www.cppblog.com/yishanhante/category/3723.html/rss"><IMG 
  title="Subscribe to WTL(2)" 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="C:\Documents and Settings\Administrator\桌面\usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl10_Link 
  href="http://www.cppblog.com/yishanhante/category/4697.html">串口(2)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl10_RssLink 
  title="Subscribe to 串口(2)" 
  href="http://www.cppblog.com/yishanhante/category/4697.html/rss"><IMG 
  title="Subscribe to 串口(2)" 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="C:\Documents and Settings\Administrator\桌面\usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl11_Link 
  href="http://www.cppblog.com/yishanhante/category/3730.html">多线程(1)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl11_RssLink 
  title="Subscribe to 多线程(1)" 
  href="http://www.cppblog.com/yishanhante/category/3730.html/rss"><IMG 
  title="Subscribe to 多线程(1)" 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="C:\Documents and Settings\Administrator\桌面\usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl12_Link 
  href="http://www.cppblog.com/yishanhante/category/3655.html">内存管理(3)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl12_RssLink 
  title="Subscribe to 内存管理(3)" 
  href="http://www.cppblog.com/yishanhante/category/3655.html/rss"><IMG 
  title="Subscribe to 内存管理(3)" 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="C:\Documents and Settings\Administrator\桌面\usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl13_Link 
  href="http://www.cppblog.com/yishanhante/category/8698.html">嵌入式开发(2)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl13_RssLink 
  title="Subscribe to 嵌入式开发(2)" 
  href="http://www.cppblog.com/yishanhante/category/8698.html/rss"><IMG 
  title="Subscribe to 嵌入式开发(2)" 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="C:\Documents and Settings\Administrator\桌面\usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl14_Link 
  href="http://www.cppblog.com/yishanhante/category/8628.html">驱动(1)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl14_RssLink 
  title="Subscribe to 驱动(1)" 
  href="http://www.cppblog.com/yishanhante/category/8628.html/rss"><IMG 
  title="Subscribe to 驱动(1)" 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="C:\Documents and Settings\Administrator\桌面\usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl15_Link 
  href="http://www.cppblog.com/yishanhante/category/9959.html">商(1)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl15_RssLink 
  title="Subscribe to 商(1)" 
  href="http://www.cppblog.com/yishanhante/category/9959.html/rss"><IMG 
  title="Subscribe to 商(1)" 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="C:\Documents and Settings\Administrator\桌面\usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl16_Link 
  href="http://www.cppblog.com/yishanhante/category/3365.html">文件流(2)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl16_RssLink 
  title="Subscribe to 文件流(2)" 
  href="http://www.cppblog.com/yishanhante/category/3365.html/rss"><IMG 
  title="Subscribe to 文件流(2)" 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="C:\Documents and Settings\Administrator\桌面\usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl17_Link 
  href="http://www.cppblog.com/yishanhante/category/9952.html">心理学(2)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl17_RssLink 
  title="Subscribe to 心理学(2)" 
  href="http://www.cppblog.com/yishanhante/category/9952.html/rss"><IMG 
  title="Subscribe to 心理学(2)" 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="C:\Documents and Settings\Administrator\桌面\usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl18_Link 
  href="http://www.cppblog.com/yishanhante/category/3713.html">杂~(3)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl18_RssLink 
  title="Subscribe to 杂~(3)" 
  href="http://www.cppblog.com/yishanhante/category/3713.html/rss"><IMG 
  title="Subscribe to 杂~(3)" 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="C:\Documents and Settings\Administrator\桌面\usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl19_Link 
  href="http://www.cppblog.com/yishanhante/category/3835.html">注册表(1)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl19_RssLink 
  title="Subscribe to 注册表(1)" 
  href="http://www.cppblog.com/yishanhante/category/3835.html/rss"><IMG 
  title="Subscribe to 注册表(1)" 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="C:\Documents and Settings\Administrator\桌面\usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files\xml(1).gif"></A> 
  </LI></UL>
<H1 class=catListTitle>文章档案</H1>
<UL class=catList>
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl02_LinkList_ctl01_Link 
  href="http://www.cppblog.com/yishanhante/archives/2009/07.html">2009年7月 
  (1)</A> 
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl02_LinkList_ctl02_Link 
  href="http://www.cppblog.com/yishanhante/archives/2009/03.html">2009年3月 
  (3)</A> 
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl02_LinkList_ctl03_Link 
  href="http://www.cppblog.com/yishanhante/archives/2008/11.html">2008年11月 
  (2)</A> 
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl02_LinkList_ctl04_Link 
  href="http://www.cppblog.com/yishanhante/archives/2008/10.html">2008年10月 
  (1)</A> 
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl02_LinkList_ctl05_Link 
  href="http://www.cppblog.com/yishanhante/archives/2007/07.html">2007年7月 
  (2)</A> 
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl02_LinkList_ctl06_Link 
  href="http://www.cppblog.com/yishanhante/archives/2007/06.html">2007年6月 
  (3)</A> 
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl02_LinkList_ctl07_Link 
  href="http://www.cppblog.com/yishanhante/archives/2007/04.html">2007年4月 
  (8)</A> 
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl02_LinkList_ctl08_Link 
  href="http://www.cppblog.com/yishanhante/archives/2007/03.html">2007年3月 
  (26)</A> 
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl02_LinkList_ctl09_Link 
  href="http://www.cppblog.com/yishanhante/archives/2007/02.html">2007年2月 
  (6)</A> 
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl02_LinkList_ctl10_Link 
  href="http://www.cppblog.com/yishanhante/archives/2007/01.html">2007年1月 
  (2)</A> </LI></UL>
<H1 class=catListTitle>相册</H1>
<UL class=catList>
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl03_LinkList_ctl01_Link 
  href="http://www.cppblog.com/yishanhante/gallery/3790.html">车车</A> 
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl03_LinkList_ctl02_Link 
  href="http://www.cppblog.com/yishanhante/gallery/4522.html">大学毕业</A> 
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl03_LinkList_ctl03_Link 
  href="http://www.cppblog.com/yishanhante/gallery/3818.html">过活</A> 
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl03_LinkList_ctl04_Link 
  href="http://www.cppblog.com/yishanhante/gallery/3796.html">来荡杭州</A> 
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl03_LinkList_ctl05_Link 
  href="http://www.cppblog.com/yishanhante/gallery/3783.html">相册~</A> </LI></UL>
<H1 class=catListTitle>CSDN</H1>
<UL class=catList>
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl04_LinkList_ctl01_Link 
  href="http://www.csdn.net/">CSDN</A> </LI></UL>
<H1 class=catListTitle>从商</H1>
<UL class=catList>
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl05_LinkList_ctl01_Link 
  href="http://biz.zjol.com.cn/">浙商网</A> </LI></UL>
<H1 class=catListTitle>朋友的博客</H1>
<UL class=catList>
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl06_LinkList_ctl01_Link 
  href="http://blog.sina.com.cn/bcyjennifer">俺女人的博客</A> 
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl06_LinkList_ctl02_Link 
  href="http://blog.sina.com.cn/midnightblack">大妹的博客</A> 
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl06_LinkList_ctl03_Link 
  href="http://blog.sina.com.cn/u/1182582522">三哥的部落阁</A> 
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl06_LinkList_ctl04_Link 
  href="http://blog.sina.com.cn/u/1279711330">小妹的博客</A> </LI></UL>
<SCRIPT language=JavaScript>
function SearchGoogle(key,evt,site)
		{
			if(evt.keyCode==13 || evt.keyCode==0 || evt.type =='click')
			{
				key.focus();
				var keystr = encodeURIComponent(key.value);
				url = "http://www.google.com/search?q=";
				url = url+keystr;
				url += "&ie=UTF-8&oe=GB2312&hl=zh-CN&domains="+site+"&sitesearch="+site;
				window.location=url;
				return false;
			}
		}
</SCRIPT>

<H3>搜索</H3>
<UL>
  <LI>
  <LI><INPUT id=q 
  onkeydown="return SearchGoogle(document.getElementById('q'),event,'www.cppblog.com/yishanhante')" 
  style="WIDTH: 130px" name=q>&nbsp;<INPUT onclick="SearchGoogle(document.getElementById('q'),event,'www.cppblog.com/yishanhante')" type=button value=搜索 name=sa> 
  </LI></UL>
<H3>最新评论 <A id=SingleColumn1__33c913f_RSSHyperlink1 
href="http://www.cppblog.com/yishanhante/CommentsRSS.aspx"><IMG 
style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
src="usb鼠标驱动注解及测试【转】 - Thinking in C++ - C++博客.files/xml.gif"></A></H3>
<DIV class=RecentComment>
<UL>
  <LI style="WORD-BREAK: break-all"><A 
  id=SingleColumn1__33c913f_CommentList_ctl01_Hyperlink1 
  href="http://www.cppblog.com/yishanhante/archive/2009/07/08/19783.html#89551">1.&nbsp;国际交易中心剑指“网上沃尔玛”</A> 

  <LI style="WORD-BREAK: break-all">评论内容较长,点击标题查看 
  <LI style="MARGIN-RIGHT: 4px; TEXT-ALIGN: right">--dfd 
  <LI style="WORD-BREAK: break-all"><A 
  id=SingleColumn1__33c913f_CommentList_ctl02_Hyperlink1 
  href="http://www.cppblog.com/yishanhante/archive/2009/06/22/19545.html#88298">2.&nbsp;re: 
  CreateFile函数详解</A> 
  <LI style="WORD-BREAK: break-all">好人啦! 
  <LI style="MARGIN-RIGHT: 4px; TEXT-ALIGN: right">--cxb 
  <LI style="WORD-BREAK: break-all"><A 
  id=SingleColumn1__33c913f_CommentList_ctl03_Hyperlink1 
  href="http://www.cppblog.com/yishanhante/archive/2009/03/28/19545.html#78107">3.&nbsp;re: 
  CreateFile函数详解[未登录]</A> 
  <LI style="WORD-BREAK: break-all">评论内容较长,点击标题查看 
  <LI style="MARGIN-RIGHT: 4px; TEXT-ALIGN: right">--snow 
  <LI style="WORD-BREAK: break-all"><A 
  id=SingleColumn1__33c913f_CommentList_ctl04_Hyperlink1 
  href="http://www.cppblog.com/yishanhante/archive/2009/03/28/19545.html#78100">4.&nbsp;re: 
  CreateFile函数详解</A> 
  <LI style="WORD-BREAK: break-all">万分感谢博主，有些不明白为什么windows里面这么多的io函数，fopen open 
  createfile。 
  <LI style="MARGIN-RIGHT: 4px; TEXT-ALIGN: right">--dospeng 
  <LI style="WORD-BREAK: break-all"><A 
  id=SingleColumn1__33c913f_CommentList_ctl05_Hyperlink1 
  href="http://www.cppblog.com/yishanhante/archive/2009/02/24/19545.html#74761">5.&nbsp;re: 
  CreateFile函数详解[未登录]</A> 
  <LI style="WORD-BREAK: break-all">佩服博主的耐心 
  <LI style="MARGIN-RIGHT: 4px; TEXT-ALIGN: right">--heidaizx </LI></UL></DIV>
<H3>阅读排行榜</H3>
<DIV class=RecentComment>
<UL style="WORD-BREAK: break-all">
  <LI><A id=SingleColumn1__2bb27cf_TopList_ctl01_Hyperlink1 
  href="http://www.cppblog.com/yishanhante/archive/2007/03/18/20050.aspx">1.&nbsp;新生活的开始(694)</A> 

  <LI><A id=SingleColumn1__2bb27cf_TopList_ctl02_Hyperlink1 
  href="http://www.cppblog.com/yishanhante/archive/2007/03/15/19908.aspx">2.&nbsp;工作三周来(592)</A> 

  <LI><A id=SingleColumn1__2bb27cf_TopList_ctl03_Hyperlink1 
  href="http://www.cppblog.com/yishanhante/archive/2007/03/14/19783.aspx">3.&nbsp;不算广告吧~ 
  友情链接而已：）(449)</A> 
  <LI><A id=SingleColumn1__2bb27cf_TopList_ctl04_Hyperlink1 
  href="http://www.cppblog.com/yishanhante/archive/2007/03/29/20861.aspx">4.&nbsp;天气好热~~~~(119)</A> 

  <LI><A id=SingleColumn1__2bb27cf_TopList_ctl05_Hyperlink1 
  href="http://www.cppblog.com/yishanhante/archive/2007/09/19/32502.aspx">5.&nbsp;我该怎么弄？(111)</A> 
  </LI></UL></DIV>
<H3>评论排行榜</H3>
<DIV class=RecentComment>
<UL style="WORD-BREAK: break-all">
  <LI><A id=SingleColumn1__12edf1f_TopList_ctl01_Hyperlink1 
  href="http://www.cppblog.com/yishanhante/archive/2007/03/14/19783.aspx">1.&nbsp;不算广告吧~ 
  友情链接而已：）(6)</A> 
  <LI><A id=SingleColumn1__12edf1f_TopList_ctl02_Hyperlink1 
  href="http://www.cppblog.com/yishanhante/archive/2007/03/15/19908.aspx">2.&nbsp;工作三周来(3)</A> 

  <LI><A id=SingleColumn1__12edf1f_TopList_ctl03_Hyperlink1 
  href="http://www.cppblog.com/yishanhante/archive/2007/03/18/20050.aspx">3.&nbsp;新生活的开始(2)</A> 

  <LI><A id=SingleColumn1__12edf1f_TopList_ctl04_Hyperlink1 
  href="http://www.cppblog.com/yishanhante/archive/2007/09/19/32502.aspx">4.&nbsp;我该怎么弄？(2)</A> 

  <LI><A id=SingleColumn1__12edf1f_TopList_ctl05_Hyperlink1 
  href="http://www.cppblog.com/yishanhante/archive/2007/03/29/20861.aspx">5.&nbsp;天气好热~~~~(1)</A> 
  </LI></UL></DIV></DIV></DIV><!--done-->
<DIV class=footer>Powered by: <A href="http://www.cnblogs.com/">博客园</A> 模板提供：<A 
href="http://blog.hjenglish.com/">沪江博客</A> Copyright ©2010 jay </DIV>
<SCRIPT type=text/javascript>
//<![CDATA[
var Page_ValidationSummaries =  new Array(document.getElementById("AjaxHolder_PostComment_ValidationSummary1"));
var Page_Validators =  new Array(document.getElementById("AjaxHolder_PostComment_RequiredFieldValidator1"), document.getElementById("AjaxHolder_PostComment_RequiredFieldValidator2"), document.getElementById("AjaxHolder_PostComment_Requiredfieldvalidator4"), document.getElementById("AjaxHolder_PostComment_RequiredFieldValidator3"));
//]]>
</SCRIPT>

<SCRIPT type=text/javascript>
//<![CDATA[
var AjaxHolder_PostComment_RequiredFieldValidator1 = document.all ? document.all["AjaxHolder_PostComment_RequiredFieldValidator1"] : document.getElementById("AjaxHolder_PostComment_RequiredFieldValidator1");
AjaxHolder_PostComment_RequiredFieldValidator1.controltovalidate = "AjaxHolder_PostComment_tbTitle";
AjaxHolder_PostComment_RequiredFieldValidator1.errormessage = "请输入标题";
AjaxHolder_PostComment_RequiredFieldValidator1.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
AjaxHolder_PostComment_RequiredFieldValidator1.initialvalue = "";
var AjaxHolder_PostComment_RequiredFieldValidator2 = document.all ? document.all["AjaxHolder_PostComment_RequiredFieldValidator2"] : document.getElementById("AjaxHolder_PostComment_RequiredFieldValidator2");
AjaxHolder_PostComment_RequiredFieldValidator2.controltovalidate = "AjaxHolder_PostComment_tbName";
AjaxHolder_PostComment_RequiredFieldValidator2.errormessage = "请输入你的姓名";
AjaxHolder_PostComment_RequiredFieldValidator2.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
AjaxHolder_PostComment_RequiredFieldValidator2.initialvalue = "";
var AjaxHolder_PostComment_Requiredfieldvalidator4 = document.all ? document.all["AjaxHolder_PostComment_Requiredfieldvalidator4"] : document.getElementById("AjaxHolder_PostComment_Requiredfieldvalidator4");
AjaxHolder_PostComment_Requiredfieldvalidator4.controltovalidate = "AjaxHolder_PostComment_CodeNumberTextBox";
AjaxHolder_PostComment_Requiredfieldvalidator4.errormessage = "请输入验证码";
AjaxHolder_PostComment_Requiredfieldvalidator4.display = "Dynamic";
AjaxHolder_PostComment_Requiredfieldvalidator4.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
AjaxHolder_PostComment_Requiredfieldvalidator4.initialvalue = "";
var AjaxHolder_PostComment_RequiredFieldValidator3 = document.all ? document.all["AjaxHolder_PostComment_RequiredFieldValidator3"] : document.getElementById("AjaxHolder_PostComment_RequiredFieldValidator3");
AjaxHolder_PostComment_RequiredFieldValidator3.controltovalidate = "AjaxHolder_PostComment_tbComment";
AjaxHolder_PostComment_RequiredFieldValidator3.errormessage = "请输入评论内容";
AjaxHolder_PostComment_RequiredFieldValidator3.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
AjaxHolder_PostComment_RequiredFieldValidator3.initialvalue = "";
var AjaxHolder_PostComment_ValidationSummary1 = document.all ? document.all["AjaxHolder_PostComment_ValidationSummary1"] : document.getElementById("AjaxHolder_PostComment_ValidationSummary1");
AjaxHolder_PostComment_ValidationSummary1.showmessagebox = "True";
AjaxHolder_PostComment_ValidationSummary1.showsummary = "False";
//]]>
</SCRIPT>

<SCRIPT type=text/javascript>
//<![CDATA[

var Page_ValidationActive = false;
if (typeof(ValidatorOnLoad) == "function") {
    ValidatorOnLoad();
}

function ValidatorOnSubmit() {
    if (Page_ValidationActive) {
        return ValidatorCommonOnSubmit();
    }
    else {
        return true;
    }
}
        
document.getElementById('AjaxHolder_PostComment_ValidationSummary1').dispose = function() {
    Array.remove(Page_ValidationSummaries, document.getElementById('AjaxHolder_PostComment_ValidationSummary1'));
}
Sys.Application.initialize();

document.getElementById('AjaxHolder_PostComment_RequiredFieldValidator1').dispose = function() {
    Array.remove(Page_Validators, document.getElementById('AjaxHolder_PostComment_RequiredFieldValidator1'));
}

document.getElementById('AjaxHolder_PostComment_RequiredFieldValidator2').dispose = function() {
    Array.remove(Page_Validators, document.getElementById('AjaxHolder_PostComment_RequiredFieldValidator2'));
}

document.getElementById('AjaxHolder_PostComment_Requiredfieldvalidator4').dispose = function() {
    Array.remove(Page_Validators, document.getElementById('AjaxHolder_PostComment_Requiredfieldvalidator4'));
}

document.getElementById('AjaxHolder_PostComment_RequiredFieldValidator3').dispose = function() {
    Array.remove(Page_Validators, document.getElementById('AjaxHolder_PostComment_RequiredFieldValidator3'));
}
//]]>
</SCRIPT>
</FORM>
<SCRIPT type=text/javascript>
        if (document.getElementById('cnblogsgooglead') != null) {
            document.getElementById('cnblogsgooglead').innerHTML = document.getElementById('cnblogsgoogleadcode').innerHTML;
            document.getElementById('cnblogsgoogleadcode').innerHTML = '';
        }

        if (document.getElementById('leftcontent') != null) {
            if (document.getElementById('leftcontent').style.display == 'none') {
                document.getElementById('leftcontent').style.display = 'inline';
            }
        }
        if (document.getElementById('Blogleftcontent') != null) {
            if (document.getElementById('cnblogsleftcontent').style.display == 'none') {
                document.getElementById('cnblogsleftcontent').style.display = 'inline';
            }
        }

        if (document.getElementById('cnblogsleftcontent') != null) {
            if (document.getElementById('cnblogsleftcontent').style.display == 'none') {
                document.getElementById('cnblogsleftcontent').style.display = 'inline';
            }
        }

        if (document.getElementById('rightmenu') != null) {
            if (document.getElementById('rightmenu').style.display == 'none') {
                document.getElementById('rightmenu').style.display = 'inline';
            }
        }
        if (document.getElementById('leftmenu') != null) {
            if (document.getElementById('leftmenu').style.display == 'none') {
                document.getElementById('leftmenu').style.display = 'inline';
            }
            if (document.getElementById('lefttemp') != null) {
                document.getElementById('leftmenu').innerHTML = document.getElementById('lefttemp').innerHTML;
                document.getElementById('lefttemp').innerHTML = '';
            }
        }

        if (document.getElementById('left') != null) {
            if (document.getElementById('left').style.display == 'none') {
                document.getElementById('left').style.display = 'inline';
            }
        }

        if (document.getElementById('cnblogsleftmenu') != null) {
            if (document.getElementById('cnblogsleftmenu').style.display == 'none') {
                document.getElementById('cnblogsleftmenu').style.display = 'inline';
            }
        }

        if (document.getElementById('menu') != null) {
            if (document.getElementById('menu').style.display == 'none') {
                document.getElementById('menu').style.display = 'inline';
            }
        }

        if (document.getElementById('cnblogsmenu') != null) {
            if (document.getElementById('cnblogsmenu').style.display == 'none') {
                document.getElementById('cnblogsmenu').style.display = 'inline';
            }
        }
    </SCRIPT>

<SCRIPT type=text/javascript>
	var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
	document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
	</SCRIPT>

<SCRIPT type=text/javascript>
	try {
	var pageTracker = _gat._getTracker("UA-476124-5");
	pageTracker._trackPageview();
	} catch(err) {}</SCRIPT>
</BODY></HTML>
